Notifying Eyes when a build is complete

By setting the APPLITOOLS_BATCH_ID environment variable, (as described in Configuring your CI for Bitbucket 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 cURL command to notify Eyes when a build is complete. Below are the most common setups when this command is needed:

  • In your CI system, Bitbucket 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, 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.

Setting an End of Build notification to Eyes

  • If you have multiple concurrent builds, on the Bitbucket integration page of the Test manager, disable automatic batch closing. 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:

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

    Where: