-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add az-tdx-vtpm workflow for e2e tests
This adds a target for the az-tdx-vtpm TEE. TDX verifiers need an SGX quoting environment, for this we need to configure the dcap configuration. Signed-off-by: Magnus Kulke <[email protected]>
- Loading branch information
Showing
4 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: KBS e2e with az-tdx-vtpm TEE | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# Note on repository checkout: pull_request_target sets `GITHUB_SHA` to the | ||
# "last commit on the PR base branch", meaning that by default `actions/checkout` | ||
# is going to checkout the repository main branch. In order to pick up the pull | ||
# request code, this workflow uses the `github.event.pull_request.head.sha` | ||
# property to get the last commit on the HEAD branch. One limitation of this approach | ||
# is that, unlike the `pull_request` event, the checked pull request isn't necessarily | ||
# rebased to main (so it is up to the workflow to ensure the pull request is rebased | ||
# **before* the workflow is triggering) | ||
pull_request_target: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
# This workflow will be run if the pull request is labeled 'test_e2e' | ||
- labeled | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
authorize: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test_e2e') | ||
steps: | ||
- run: "true" | ||
|
||
checkout-and-rebase: | ||
runs-on: ubuntu-latest | ||
needs: authorize | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# fetch main on push, otherwise the head of the PR | ||
ref: ${{ github.event_name == 'push' && 'main' || github.event.pull_request.head.sha }} | ||
|
||
- name: Rebase the source | ||
if: github.event_name != 'push' | ||
run: | | ||
git config --global user.name "GH Actions Workflow" | ||
git config --global user.email "<rebase@gh-actions-workflow>" | ||
./kbs/hack/ci-helper.sh rebase-atop-of-the-latest-target-branch | ||
- name: Archive source | ||
run: git archive -o kbs.tar.gz HEAD | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./kbs.tar.gz | ||
|
||
e2e-test: | ||
needs: | ||
- authorize | ||
- checkout-and-rebase | ||
uses: ./.github/workflows/kbs-e2e.yaml | ||
with: | ||
runs-on: '["self-hosted","azure-cvm-tdx"]' | ||
tarball: kbs.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters