ci: only run verify with JSON output on v2.14 or newer (#2649)

* Only run verify with JSON output on v2.14 or newer
* Dont upload TCB version for AWS on v2.13
* Remove workaround for CLI not yet support apply to initialize clusters

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-11-28 14:31:27 +01:00 committed by GitHub
parent 960118dc00
commit ca89a31f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -167,12 +167,7 @@ runs:
id: constellation-init
shell: bash
run: |
# TODO(v2.14): Remove workaround for CLIs not supporting apply command
cmd="apply --skip-phases=infrastructure"
if constellation --help | grep -q init; then
cmd=init
fi
constellation $cmd --debug
constellation apply --skip-phases=infrastructure --debug
echo "KUBECONFIG=$(pwd)/constellation-admin.conf" | tee -a $GITHUB_OUTPUT
- name: Wait for nodes to join and become ready

View File

@ -66,7 +66,8 @@ runs:
forwarderPID=$!
sleep 5
if [[ ${{ inputs.cloudProvider }} == "azure" || ${{ inputs.cloudProvider }} == "aws" ]]; then
# TODO(v2.15): Remove workaround since we don't need to support v2.13 anymore
if [[ ${{ inputs.cloudProvider }} == "azure" ]] || { [[ ${{ inputs.cloudProvider }} == "aws" ]] && ! constellation version | grep -q "v2.13."; }; then
echo "Extracting TCB versions for API update"
constellation verify --cluster-id "${clusterID}" --node-endpoint localhost:9090 -o json > "snp-report-${node}.json"
else
@ -90,6 +91,11 @@ runs:
COSIGN_PASSWORD: ${{ inputs.cosignPassword }}
COSIGN_PRIVATE_KEY: ${{ inputs.cosignPrivateKey }}
run: |
if [[ ${{ inputs.cloudProvider }} == "aws" ]] && constellation version | grep -q "v2.13."; then
echo "Skipping TCB upload for AWS on CLI v2.13"
exit 0
fi
reports=(snp-report-*.json)
if [ -z ${#reports[@]} ]; then
exit 1