When the container with osbuild-composer gets built in our CI or by AppSRE, we do not set the composer version to any value (as we do when we built RPMs). As a result, the version reported by composer is always "devel". This is not useful for debugging and determining the used version of composer. In addition, this information now gets exposed in Koji builds, therefore it makes sense to make it useful. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
25 lines
611 B
Bash
Executable file
25 lines
611 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
echo "Prepare host system"
|
|
|
|
sudo dnf -y install podman
|
|
|
|
echo "Build container"
|
|
|
|
IMAGE_NAME="quay.io/osbuild/osbuild-composer-ubi-pr"
|
|
IMAGE_TAG="${CI_COMMIT_SHA:-$(git rev-parse HEAD)}"
|
|
|
|
podman \
|
|
build \
|
|
--file="distribution/Dockerfile-ubi" \
|
|
--tag="${IMAGE_NAME}:${IMAGE_TAG}" \
|
|
--build-arg="COMMIT=${IMAGE_TAG}" \
|
|
--label="quay.expires-after=1w" \
|
|
.
|
|
|
|
# Push to reuse later in the pipeline (see regression tests)
|
|
BRANCH_NAME="${BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
|
|
podman push \
|
|
--creds "${V2_QUAY_USERNAME}":"${V2_QUAY_PASSWORD}" \
|
|
"${IMAGE_NAME}:${IMAGE_TAG}"
|