Notifying Eyes when a build is complete

By setting the APPLITOOLS_BATCH_ID environment variable, as described in Configuring your CI for the GitHub integration, Eyes puts the results of all tests in a particular CI build in the same Test Manager batch. In some setups, you need to disable this automatic notification and add a command to notify Eyes when a build is complete. Below are the most common setups when this command is needed:

  • In your CI system, GitHub cannot recognize an End of Build event, in which case add the cURL command to the end of the build script to notify Eyes that the build is complete.

  • If you have multiple concurrent builds, or parallel push and pull requests, add the cURL command to the end of main script build to prevent Eyes from receiving End of Build notifications before all builds have completed.

Synchronizing multiple concurrent builds

  • In the GitHub integration page of the Test Manager, follow the instructions to disable automatic batch closing described in Configuring GitHub repositories. This is a one-time configuration that needs to be done by each team for each repository that has concurrent builds.

  • Add an cURL command at the end of the build script to tell Eyes that the build is complete. The following is an example of the required script in a Linux-based system:

    curl -X POST "$APPLITOOLS_SERVER_URL/api/externals/github/servers/<github server host>/commit/$APPLITOOLS_BATCH_ID/$APPLITOOLS_BATCH_BUILD_ID/complete?apiKey=$APPLITOOLS_API_KEY"