Working With CicleCI
Configuring the Applitools CI/CD Integration
-
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 -
In the project dashboard, click the gear icon
-
On the left menu, under Build Settings, click Environment Variables.
-
Click Add Variable.
-
In the Name field enter
APPLITOOLS_API_KEY
. -
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.
-
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>"