Global CI Validation
Along with the CI on each individual change, you may have CI tests you would like to run on the ChangeSet as a whole before the PRs are merged. These tests can target integration-level functionality to test that all these PRs work together. Aviator offers this using a global CI framework. When you enable this setting, Aviator issues webhooks that you can use to trigger CI tests for these pre-merge checks on a ChangeSet.
Once all the PRs are added to the ChangeSet, you can trigger a Global CI by clicking the "Start CI" button on the ChangeSet page. This will send a webhook to the configured Webhook endpoint. The webhook will provide information about the related repos, branch names, and SHAs to be used for the CI. The payload will be in json format with the following parameters:
Integer. Identifier for ChangeSet.
Integer. Represents a unique ID for the status run. Each time the webhook is triggered, a new Status Run ID is issued. This will be used to track the status of the CI.
A list of objects representing each PullRequest in the ChangeSet. Each object has the following parameters below:
Integer. PR Number associated with the action.
String. Name of the base branch associated with the PR.
String. Name of the head branch associated with the PR.
String. The SHA of the latest commit on the branch.
String. The GitHub username of the PR author.
String. The GitHub repo name represented as org_name/repo_name.
The owner of the ChangeSet. This typically represents the user who created the ChangeSet. Contains the following parameter:
String. The email address of the owner.
Object. A Dictionary of key-values as specified in the global and local parameters.
"email": "[email protected]"
Note: This webhook should return a valid HTTP 200 response. If an invalid status code is returned, Aviator will consider the CI as "failed".
Note: The webhook payload only includes PRs that have been added to the ChangeSet. There will be no associated entry in the webhook payload for PRs that are not included in the ChangeSet.
Once the global CI is triggered, your service should report the status check back using the
Report CI global status check
You can run multiple global status checks and report them separately for the same status_run_id using unique name properties. Each of these unique checks are reported back as status checks on every PR in the ChangeSet.