Configuring your CI for the Eyes GitHub 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:

Travis CI

Build configuration

In the file .travis.yml add the following line under the script section before running the visual UI test

script:
- export APPLITOOLS_BATCH_ID=`echo ${TRAVIS_PULL_REQUEST_SHA:=$TRAVIS_COMMIT}`

Environment variable

On your project page
  1. Click on “More options” and then select "Settings".
  2. In the “Environment Variables” section fill in the "Name" and "Value" fields.
  3. In the "Name" field put APPLITOOLS_API_KEY.
  4. In the "Value" field put your API key. To obtain your key see How to obtain your API key.
  5. Click "Add".

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".

Semaphore CI

Build configuration

In the project page
  1. Click "Project Settings" .
  2. In the setup panel click "Add New Command Line".
  3. Copy the following line to the field and press enter.

export APPLITOOLS_BATCH_ID=`echo $REVISION`

Environment variable

In the project page
  1. Click on “Environment Variables”.
  2. Click “Add”.
  3. In the Name field put APPLITOOLS_API_KEY.
  4. In the content field put your API key. To obtain your key see How to obtain your API key.
  5. Tick the "Encrypt" content check box.
  6. Click "Create 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

For full instructions on integration with Jenkins see Updating Jenkins Build status

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}`

Environment variable

Configure the API key as follows:

export APPLITOOLS_API_KEY= "your api key"