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 f451dc1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 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)
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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f451dc1

Please sign in to comment.