Skip to main content
Version: Next

CI/CD with AskUI

You have two options to implement your pipeline. With our AskUI Runner Docker container or without it.

The main difference without the AskUI Runner container is, that you can not download the latest version of your workflows from AskUI Studio inside your pipeline but have to provide them to your build.

GitHub Actions​

AskUI Runner Container: Get Workflows from AskUI Studio​

When you want to get the latest version of your workflows from AskUI Studio, the AskUI Runner container needs a configuration file config.yaml to know where to pull them from.

The AskUI Runner container downloads the workflows and runs them inside a docker container. You do not have to take care of any installation of tools on your side πŸ₯³.

  1. Set these environment variables for your pipeline:
ASKUI_WORKSPACE_ID=<Your workspace id from AskUI Studio>
ASKUI_TOKEN=<An access token from your AskUI Studio workspace>
ASKUI_INFERENCE_SERVER_URL=<Use https://inference.askui.com if your are not on-premise>
ASKUI_WORKFLOW_ENDPOINT_URL=https://app-gateway-api.askui.com/prod/api/v1

DOCKER_USERNAME=<Your Docker Hub username>
DOCKER_PASSWORD=<Your Docker Hub password>
  1. Create a config.yaml inside your pipeline like this:
cat << EOF > config.yaml
access_token: ${{ secrets.ASKUI_TOKEN }}
inference_server_url: ${{ secrets.ASKUI_INFERENCE_SERVER_URL }}
workspace_id: ${{ secrets.ASKUI_WORKSPACE_ID }}
workflow_endpoint:
prefixes:
- workspaces/${{ secrets.ASKUI_WORKSPACE_ID }}/test-cases
url: ${{ secrets.ASKUI_WORKFLOW_ENDPOINT_URL }}/workspaces/${{ secrets.ASKUI_WORKSPACE_ID }}/objects
EOF
  1. Execute your workflows with our AskUI Runner container. Do not forget to login into Docker Hub πŸ˜‰.
docker run --shm-size="2g" --rm -v ${{ github.workspace }}/config.yaml:/home/askui/config.yaml -v ${{ github.workspace }}/allure-results:/home/askui/test_project/allure-results askuigmbh/askui-runner:v0.13.1-github
  1. Generate Allure report: The run results are placed in allure-results where you can render your report from. Check the detailed examples for your pipeline technology.

Please check the full example file on GitHub.

Without AskUI Runner Container​

Download the workflows from AskUI Studio and place the folder test in the root of your repository.

Then implement the following steps in your pipeline:

  • Optional: Set up AskUI Controller as service
  • Setup node in version 16.x
  • Install all dependencies: npm install
  • Run tests with npm run test
    • Set the environment variables:
      • ASKUI_WORKSPACE_ID
      • ASKUI_TOKEN
      • ASKUI_INFERENCE_SERVER_URL
      • Optional: UI_CONTROLLER_URL if the UIController is running on a remote machine and not localhost or as a service inside your pipeline.
  • For reports:
    • Generate reports
    • Deploy/Send reports

Please check the full example file on GitHub.

Gitlab CI​

AskUI Runner Container: Get Workflows from AskUI Studio​

When you want to get the latest version of your workflows from AskUI Studio, the AskUI Runner container needs a configuration file config.yaml to know where to pull them from.

The AskUI Runner container downloads the workflows and runs them inside a docker container. You do not have to take care of any installation of tools on your side πŸ₯³.

  1. Set these Gitlab variables for your pipeline:
ASKUI_WORKSPACE_ID=<Your workspace id from AskUI Studio>
ASKUI_TOKEN=<An access token from your AskUI Studio workspace>
ASKUI_INFERENCE_SERVER_URL=<Use https://inference.askui.com if your are not on-premise>
ASKUI_WORKFLOW_ENDPOINT_URL=https://app-gateway-api.askui.com/prod/api/v1

DOCKER_USERNAME=<Your Docker Hub username>
DOCKER_PASSWORD=<Your Docker Hub password>
  1. Create a config.yaml inside your pipeline like this:
cat << EOF > config.yaml
access_token: $ASKUI_TOKEN
inference_server_url: $ASKUI_INFERENCE_SERVER_URL
workspace_id: $ASKUI_WORKSPACE_ID
workflow_endpoint:
prefixes:
- workspaces/${ASKUI_WORKSPACE_ID}/test-cases
url: ${ASKUI_WORKFLOW_ENDPOINT_URL}/workspaces/${ASKUI_WORKSPACE_ID}/objects
EOF
  1. Do not forget to login into Docker HubΒ and enable Docker-In-Docker like this πŸ˜‰:
services:
- docker:dind
before_script:
- docker info
- echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USERNAME --password-stdin
  1. Execute your workflows with our AskUI Runner container.
docker run --shm-size="2g" --rm -v ./config.yaml:/home/askui/config.yaml -v ./allure-results:/home/askui/test_project/allure-results askuigmbh/askui-runner:v0.13.1-github
  1. Generate Allure report: The run results are placed in allure-results where you can render your report from.

Check the detailed examples for your pipeline technology.

Please check the full example file on Gitlab.com.

Without AskUI Runner Container​

Download the workflows from AskUI Studio and place the folder test in the root of your repository.

Then implement the following steps in your pipeline:

  • Optional: Set up AskUI Controller as service
  • Setup node in version 16.x
  • Install all dependencies: npm install
  • Run tests with npm run test
    • Set the environment variables:
      • ASKUI_WORKSPACE_ID
      • ASKUI_TOKEN
      • ASKUI_INFERENCE_SERVER_URL
      • Optional: UI_CONTROLLER_URL if the UIController is running on a remote machine and not localhost or as a service inside your pipeline.
  • For reports:
    • Generate reports
    • Deploy/Send reports

Please check the full example file on Gitlab.com.

Azure DevOps​

AskUI Runner Container: Get Workflows from AskUI Studio​

When you want to get the latest version of your workflows from AskUI Studio, the AskUI Runner container needs a configuration file config.yaml to know where to pull them from.

The AskUI Runner downloads the workflows and runs them inside a docker container. You do not have to take care of any installation of tools on your side πŸ₯³.

  1. Set these variables for your pipeline:
ASKUI_WORKSPACE_ID=<Your workspace id from AskUI Studio>
ASKUI_TOKEN=<An access token from your AskUI Studio workspace>
ASKUI_INFERENCE_SERVER_URL=<Use https://inference.askui.com if your are not on-premise>
ASKUI_WORKFLOW_ENDPOINT_URL=https://app-gateway-api.askui.com/prod/api/v1

DOCKER_USERNAME=<Your Docker Hub username>
DOCKER_PASSWORD=<Your Docker Hub password>
  1. Create a config.yaml inside your pipeline like this:
cat << EOF > config.yaml
access_token: $(ASKUI_TOKEN)
inference_server_url: $(ASKUI_INFERENCE_SERVER_URL)
workspace_id: $(ASKUI_WORKSPACE_ID)
workflow_endpoint:
prefixes:
- workspaces/$(ASKUI_WORKSPACE_ID)/test-cases
url: $(ASKUI_WORKFLOW_ENDPOINT_URL)/workspaces/$(ASKUI_WORKSPACE_ID)/objects
EOF
  1. Execute your workflows with our AskUI Runner container. Do not forget to login into Docker Hub πŸ˜‰.
echo "$(DOCKER_PASSWORD)" | docker login --username $(DOCKER_USERNAME) --password-stdin
docker run --shm-size="2g" --rm -v "/$(pwd)/config.yaml:/home/askui/config.yaml" -v "/$(pwd)/allure-results:/home/askui/test_project/allure-results" askuigmbh/askui-runner:v0.13.1-github
  1. Generate Allure report: The run results are placed in allure-results where you can render your report from. Check the detailed examples for your pipeline technology.
- bash: |
curl -o allure-commandline-2.10.0.tgz -OLs https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.10.0/allure-commandline-2.10.0.tgz
sudo tar -zxf allure-commandline-2.10.0.tgz -C .
echo "Creating allure-report"
./allure-2.10.0/bin/allure generate allure-results -o allure-report
echo "allure-report created"
# Install https://github.com/mclay/azure-pipeline-allure-report first
- task: PublishAllureReport@1
displayName: 'Publish Allure Report'
inputs:
reportDir: 'allure-report'

Please check the full example file on GitHub.

Without AskUI Runner Container​

Download the workflows from AskUI Studio and place the folder test in the root of your repository.

Then implement the following steps in your pipeline:

    • Set the pipeline variables:
      • ASKUI_WORKSPACE_ID
      • ASKUI_TOKEN
      • ASKUI_INFERENCE_SERVER_URL
      • Optional: UI_CONTROLLER_URL if the UIController is running on a remote machine and not localhost or as a service inside your pipeline.
  • Setup docker and node in version 16.x
- task: DockerInstaller@0
inputs:
dockerVersion: '17.09.0-ce'
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
  • Start the AskUI Controller from our Docker image
- bash: |
sudo ufw disable
echo 'Start UIController'
docker run -d -p 6769:6769 --cidfile container.cid askuigmbh/askui-ui-controller:v0.11.2-chrome-100.0.4896.60-amd64
  • Install all dependencies and run the workflow:
echo 'Run npm install'
npm install
echo 'Run AskUI'
export ASKUI_TOKEN=$(ASKUI_TOKEN)
export ASKUI_WORKSPACE_ID=$(ASKUI_WORKSPACE_ID)
npm run test
  • For reports:
    • Generate reports
    • Deploy/Send reports
- bash: |
curl -o allure-commandline-2.10.0.tgz -OLs https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.10.0/allure-commandline-2.10.0.tgz
sudo tar -zxf allure-commandline-2.10.0.tgz -C .
echo "Creating allure-report"
./allure-2.10.0/bin/allure generate allure-results -o allure-report
echo "allure-report created"
# Install https://github.com/mclay/azure-pipeline-allure-report first
- task: PublishAllureReport@1
displayName: 'Publish Allure Report'
inputs:
reportDir: 'allure-report'

Please check the full example file on GitHub.