Skip to content

Commit

Permalink
Test/old-worker-new-composer: use latest composer for verification
Browse files Browse the repository at this point in the history
To avoid incompatibility between older image-info and latest osbuild
  • Loading branch information
diaasami committed Feb 16, 2024
1 parent 09478b7 commit ba6239a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/cases/regression-old-worker-new-composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
VERIFICATION_COMPOSER_RPM="osbuild-composer-$((CURRENT_COMPOSER_VERSION - 1))"

COMPOSER_LATEST_TAG_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/ref/tags/v$((CURRENT_COMPOSER_VERSION-1))" | 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
Expand Down Expand Up @@ -380,8 +387,10 @@ $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
sudo dnf install -y $VERIFICATION_COMPOSER_RPM

curl "${S3_URL}" --output "${WORKDIR}/disk.qcow2"

Expand Down

0 comments on commit ba6239a

Please sign in to comment.