From f451dc176ea9d79ecf51fc310898d0fd656fdde5 Mon Sep 17 00:00:00 2001 From: Diaa Sami Date: Fri, 16 Feb 2024 14:38:49 +0100 Subject: [PATCH] Test/old-worker-new-composer: use latest composer for verification To avoid incompatibility between older image-info and latest osbuild --- test/cases/regression-old-worker-new-composer.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/cases/regression-old-worker-new-composer.sh b/test/cases/regression-old-worker-new-composer.sh index 512817fd6b4..f8c384d9b1e 100644 --- a/test/cases/regression-old-worker-new-composer.sh +++ b/test/cases/regression-old-worker-new-composer.sh @@ -31,6 +31,13 @@ DESIRED_WORKER_RPM="osbuild-composer-worker-$((CURRENT_WORKER_VERSION - 3))" DESIRED_TAG_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/ref/tags/v$((CURRENT_WORKER_VERSION-3))" | jq -r '.object.sha') DESIRED_COMMIT_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/tags/$DESIRED_TAG_SHA" | jq -r '.object.sha') +# Get commit hash of latest composer version, only used for verification. +CURRENT_COMPOSER_VERSION=$(rpm -q --qf '%{version}\n' osbuild-composer) +DESIRED_COMPOSER_RPM="osbuild-composer-$((CURRENT_COMPOSER_VERSION))" + +COMPOSER_LATEST_TAG_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/ref/tags/v$((DESIRED_COMPOSER_RPM))" | jq -r '.object.sha') +COMPOSER_LATEST_COMMIT_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/tags/$COMPOSER_LATEST_TAG_SHA" | jq -r '.object.sha') + COMPOSER_CONTAINER_NAME="composer" # Container image used for cloud provider CLI tools @@ -380,6 +387,8 @@ $AWS_CMD s3api put-object-tagging \ greenprint "✅ Successfully tagged S3 object" +setup_repo osbuild-composer "$COMPOSER_LATEST_COMMIT_SHA" 10 + greenprint "Installing osbuild-composer-tests for image-info" sudo dnf install -y osbuild-composer-tests