Skip to content

Commit

Permalink
test: Add GitHub action for triggering A/B-Tests
Browse files Browse the repository at this point in the history
The Action triggers on push events to main instead of on pull request
merge events. This is because pull request events are triggered in the
context of a fork, whereas push events are triggered in the context of
the firecracker repository. Only the latter context allows access to
GitHub secrets.

Signed-off-by: Patrick Roy <[email protected]>
  • Loading branch information
roypat committed Sep 25, 2023
1 parent 2acde4a commit 11f2d43
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/trigger_ab_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
branches:
- main

jobs:
trigger_ab_test:
runs-on: ubuntu-latest
if: ${{ github.event.forced == false }}
steps:
- name: "Trigger Buildkite Pipeline"
run: |
curl -X POST https://api.buildkite.com/v2/organizations/firecracker/pipelines/performance-a-b-tests/builds \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${{ secrets.BUILDKITE_TOKEN }}' \
-d '{
"commit": "HEAD",
"branch": "${{ github.event.ref }}",
"env": {
"REVISION_A": "${{ github.event.before }}",
"REVISION_B": "${{ github.event.after }}"
}
}'

0 comments on commit 11f2d43

Please sign in to comment.