Skip to content

Commit

Permalink
libvirt: enable e2e test for attestation case in gha
Browse files Browse the repository at this point in the history
Fixes: #1825

Signed-off-by: Qi Feng Huo <huoqif@cn.ibm.com>
  • Loading branch information
Qi Feng Huo committed May 15, 2024
1 parent 31d11f9 commit 798ccd4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/e2e_libvirt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
- name: Read properties from versions.yaml
run: |
sudo snap install yq
echo "KBS_REPO=$(yq -e '.git.kbs.url' versions.yaml)" >> "$GITHUB_ENV"
echo "KBS_VERSION=$(yq -e '.git.kbs.reference' versions.yaml)" >> "$GITHUB_ENV"
echo "RUST_VERSION=$(yq -e '.tools.rust' versions.yaml)" >> "$GITHUB_ENV"
go_version="$(yq '.tools.golang' versions.yaml)"
[ -n "$go_version" ]
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -86,10 +89,30 @@ jobs:
# For debugging
cat libvirt.properties
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
override: true
profile: minimal

- name: Checkout kbs Repository and build kbs-client
run: |
git clone "${KBS_REPO}" test/trustee
pushd test/trustee
git checkout "${KBS_VERSION}"
pushd kbs
make CLI_FEATURES=sample_only cli
popd
# For debugging
ls ./target/release
popd
- name: run tests
id: runTests
run: |
export CLOUD_PROVIDER=libvirt
export DEPLOY_KBS=true
export TEST_PROVISION="yes"
export TEST_TEARDOWN="no"
export TEST_PROVISION_FILE="$PWD/libvirt.properties"
Expand Down
5 changes: 5 additions & 0 deletions src/cloud-api-adaptor/libvirt/config_libvirt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,8 @@ popd
rm -f libvirt.properties
echo "libvirt_uri=\"qemu+ssh://${USER}@${IP}/system?no_verify=1\"" >> libvirt.properties
echo "libvirt_ssh_key_file=\"id_rsa\"" >> libvirt.properties
echo "CLUSTER_NAME=\"peer-pods\"" >> libvirt.properties
KBS_IMAGE=$(./hack/yq-shim.sh '.oci.kbs.registry' ./versions.yaml)
KBS_IMAGE_TAG=$(./hack/yq-shim.sh '.oci.kbs.tag' ./versions.yaml)
[ -z ${KBS_IMAGE} ] || echo "KBS_IMAGE=\"${KBS_IMAGE}\"" >> libvirt.properties
[ -z ${KBS_IMAGE_TAG} ] || echo "KBS_IMAGE_TAG=\"${KBS_IMAGE_TAG}\"" >> libvirt.properties
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cloudimg:
tools:
bats: 1.10.0
golang: 1.21.10
rust: 1.72.0
rust: 1.74.0
protoc: 3.15.0
packer: v1.9.4
# Referenced Git repositories
Expand Down

0 comments on commit 798ccd4

Please sign in to comment.