Configuring your CI for the Eyes Bitbucket integration

Configuring your CI involves two steps
  1. Setting the environment variable APPLITOOLS_API_KEY to your API key.
  2. Configuring the build so that before it runs the visual UI test, it sets the environment variable APPLITOOLS_BATCH_ID to a value generated by the CI.
For detailed configuration instructions, please select your platform:

CircleCI

Build configuration

In the folder .circleci, in the file config.yml add the following run command under jobs/build/steps before running the visual UI test.

jobs:
  build:
    steps:
       - run: "export APPLITOOLS_BATCH_ID=`echo $CIRCLE_SHA1`"

Environment variable

In the project dashboard
  1. Press the “gear” icon.
  2. On the menu on the left, under “Build Settings”, click “Environment variable”.
  3. Click “Add Variable”.
  4. In the "Name" field put APPLITOOLS_API_KEY.
  5. In the "Value" field put your API key. To obtain your key see How to obtain your API key.
  6. Click "Add Variable".

AppVeyor

Build configuration

In the file appveyor.yml add the following line in the "init:" section:

init:
  - ps: $env:APPLITOOLS_BATCH_ID = if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) { $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT } else { $env:APPVEYOR_REPO_COMMIT }

Environment variable

On your project page
  1. Click “SETTINGS".
  2. On the left panel select “Environment”.
  3. In the Environment variables section click “Add variable”.
  4. In the Name field put APPLITOOLS_API_KEY.
  5. In the value field put your API key. To obtain your key see How to obtain your API key.
  6. Click "Save".

Jenkins

Both configuration and setting the environment variable are done by navigating to the Jenkins project configuration, and going to the Execute shell window.

Build configuration

Set the APPLITOOLS_BATCH_ID as follows:

export APPLITOOLS_BATCH_ID=`echo ${GIT_COMMIT}`

Note: according to your implementation, replace {GIT_COMMIT} with the environment variable you use to store the pull request Commit SHA.

Environment variable

Configure the API key as follows:

export APPLITOOLS_API_KEY= "your api key"

Bamboo

Build configuration

  1. Navigate to the Plan configuration page.
  2. In the Variables tab set the APPLITOOLS_API_KEY variable as follows:
    1. Enter the APPLITOOLS_API_KEY in the Variable name field.
    2. Enter your API key as the field value.

Environment variable

Set the APPLITOOLS_BATCH_ID variable to:
${bamboo_repository_branch_name}/${bamboo_repository_revision_number}