From a40e936e8bfc05a0bb4890c9180e94edce6c6e51 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 15 Nov 2024 16:41:32 +0100 Subject: [PATCH 1/3] build: better version check If PODMAN_RPM_TYPE is set to dev the Containerfile will pull from the podman-next copr. This if fine for our podman x.y+1 images but for the releases we need the proper version. Add some validation and only allow the two values "dev" and "release" so it is more clear what version is build. And also bump the version to 5.4.0-dev as this is what the copr should pull now. Signed-off-by: Paul Holzinger --- build.sh | 7 +++++++ podman-rpm-info-vars.sh | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index e700b61..7e7d476 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,13 @@ fi echo " Building image locally" +# Validate podman RPM type var, see the Containerfile for the pull logic. +case "${PODMAN_RPM_TYPE}" in + "dev") echo "Will install podman from the podman-next copr, the podman version is ignored" ;; + "release") ;; + *) echo 'PODMAN_RPM_TYPE must be set to "dev" or "release"' 1>&2; exit 1 +esac + # See podman-rpm-info-vars.sh for all build-arg values. If PODMAN_RPM_TYPE is # "dev", the rpm version, release and fedora release values are of no concern # to the build process. diff --git a/podman-rpm-info-vars.sh b/podman-rpm-info-vars.sh index a130f35..918b4cd 100755 --- a/podman-rpm-info-vars.sh +++ b/podman-rpm-info-vars.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash -# Set PODMAN_RPM_TYPE to anything other than "dev" to build release rpms. +# Set to "dev" to pull from the podman-next copr, set to "release" +# to pull the ext rom from the fedora build system based of the versions below. export PODMAN_RPM_TYPE="dev" # If PODMAN_RPM_TYPE is "dev", the vars below don't end up getting used in the # build -export PODMAN_VERSION="5.3.0~rc2" +export PODMAN_VERSION="5.4.0-dev" export PODMAN_RPM_RELEASE="1" From 2cc74661648652b3ba422b5ce585f56185274cec Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 15 Nov 2024 16:47:35 +0100 Subject: [PATCH 2/3] windows: update podman to 5.3.0 5.3.0 is released so we should use the new installer for testing. Signed-off-by: Paul Holzinger --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8c14118..7d220fc 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -74,7 +74,7 @@ verify_windows_task: PATH: "${PATH};C:\\Program Files\\RedHat\\Podman" MACHINE_IMAGE: "podman-machine.${ARCH}.hyperv.vhdx.zst" MACHINE_IMAGE_URL: "https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/Image Build ${ARCH}/image/${MACHINE_IMAGE}" - PODMAN_VERSION: 5.2.5 + PODMAN_VERSION: 5.3.0 setup_script: .\contrib\cirrus\windows_setup.ps1 main_script: | $Env:CONTAINERS_MACHINE_PROVIDER = "hyperv" From a5c47a1c3f55f0f31f986196d2c32378ed703e95 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 15 Nov 2024 17:33:26 +0100 Subject: [PATCH 3/3] fix github action output First specify bash as /bin/sh seems to default to dash. Then output is not captured by default and one must write into $GITHUB_OUTPUT with a key. And multiline handline is even more special. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#example-of-a-multiline-string Signed-off-by: Paul Holzinger --- .github/workflows/pr_image_links.yml | 7 +++++-- contrib/cirrus/print-artifacts-urls.sh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_image_links.yml b/.github/workflows/pr_image_links.yml index f3497bc..39026c3 100644 --- a/.github/workflows/pr_image_links.yml +++ b/.github/workflows/pr_image_links.yml @@ -65,7 +65,10 @@ jobs: - if: steps.retro.outputs.is_pr == 'true' name: Print Artifacts output id: artifact_output - run: ./contrib/cirrus/print-artifacts-urls.sh "${{ steps.retro.outputs.bid }}" + run: | + echo 'comment<> $GITHUB_OUTPUT + ./contrib/cirrus/print-artifacts-urls.sh "${{ steps.retro.outputs.bid }}" >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT - if: steps.retro.outputs.is_pr == 'true' name: Send GitHub PR comment @@ -75,4 +78,4 @@ jobs: # the tag causes it to replace the comment comment-tag: artifacts mode: recreate - message: ${{ steps.artifact_output.outputs.stdout }} + message: "${{ steps.artifact_output.outputs.comment }}" diff --git a/contrib/cirrus/print-artifacts-urls.sh b/contrib/cirrus/print-artifacts-urls.sh index 0e37f59..f40a434 100755 --- a/contrib/cirrus/print-artifacts-urls.sh +++ b/contrib/cirrus/print-artifacts-urls.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash CIRRUS_BUILD_ID=$1