Skip to main content

Working With CicleCI

Configuring the Applitools CI/CD Integration

  1. In the config.yml file in the .circlec folder, add the following command under jobs/build/steps so that it runs before the Eyes test starts:

    jobs:
    build:
    steps:
    - run:
    command: |
    export APPLITOOLS_BATCH_ID=$(echo $CIRCLE_SHA1)
    run_the_test
  2. In the project dashboard, click the gear icon

  3. On the left menu, under Build Settings, click Environment Variables.

  4. Click Add Variable.

  5. In the Name field enter APPLITOOLS_API_KEY.

  6. In the Value field enter the value of your API key. To obtain the value of your API key, see How to obtain your API key.

  7. Click Add Variable.

Preparing For Commit Push Action

If you're triggering a build from commit push actions, the Eyes server must be notified. Here's an example of how to notify the Eyes Server using a curl request:

curl -L -d '' -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/push?
apiKey=$APPLITOOLS_API_KEY&CommitSha=$APPLITOOLS_BATCH_ID&BranchName=${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}
&ParentBranchName=<Parent branch name - optional>"