From 2692f4391918abbb1988e1801229bad2a9402cb6 Mon Sep 17 00:00:00 2001 From: Sascha Schwarze Date: Sun, 12 May 2024 16:09:30 +0200 Subject: [PATCH 1/2] Filter out BuildAh immutable tags --- hack/check-latest-images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/check-latest-images.sh b/hack/check-latest-images.sh index 9acb422a40..d62ee3e611 100755 --- a/hack/check-latest-images.sh +++ b/hack/check-latest-images.sh @@ -46,7 +46,7 @@ function update() { # Determine the latest tag QUERY=".tag_name" if [[ ${IMAGE} == *buildah* ]]; then - QUERY=".tags | sort_by(.name) | reverse | .[0].name" + QUERY="[.tags[] | select(.name | endswith(\"immutable\") | not) ] | sort_by(.name) | reverse | .[0].name" fi LATEST_TAG="$(curl --silent --retry 3 "${LATEST_RELEASE_URL}" | jq --raw-output "${QUERY}")" From fe5ffc7740d5a0a3316e175e8b039484923d7c97 Mon Sep 17 00:00:00 2001 From: Sascha Schwarze Date: Sun, 12 May 2024 16:16:21 +0200 Subject: [PATCH 2/2] Change imagePullPolicy to Always so that the newest BuildAh image is always used --- .../buildstrategy_buildah_shipwright_managed_push_cr.yaml | 1 + .../buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml | 1 + .../source-to-image/buildstrategy_source-to-image-redhat_cr.yaml | 1 + .../buildstrategy_buildah_shipwright_managed_push_cr.yaml | 1 + .../buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml | 1 + .../source-to-image/buildstrategy_source-to-image-redhat_cr.yaml | 1 + 6 files changed, 6 insertions(+) diff --git a/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml b/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml index 4036be4e61..b23ad1160e 100644 --- a/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml +++ b/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml @@ -7,6 +7,7 @@ spec: buildSteps: - name: build image: quay.io/containers/buildah:v1.35.3 + imagePullPolicy: Always workingDir: $(params.shp-source-root) securityContext: privileged: true diff --git a/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml b/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml index ff00f351d9..829b01bd92 100644 --- a/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml +++ b/samples/v1alpha1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml @@ -7,6 +7,7 @@ spec: buildSteps: - name: build-and-push image: quay.io/containers/buildah:v1.35.3 + imagePullPolicy: Always workingDir: $(params.shp-source-root) securityContext: capabilities: diff --git a/samples/v1alpha1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml b/samples/v1alpha1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml index 2c13c870e3..9b7a5bbd24 100644 --- a/samples/v1alpha1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml +++ b/samples/v1alpha1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml @@ -22,6 +22,7 @@ spec: mountPath: /s2i - name: buildah image: quay.io/containers/buildah:v1.35.3 + imagePullPolicy: Always workingDir: /s2i securityContext: privileged: true diff --git a/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml b/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml index cf2f9deb22..9fd38e71e4 100644 --- a/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml +++ b/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_shipwright_managed_push_cr.yaml @@ -7,6 +7,7 @@ spec: steps: - name: build image: quay.io/containers/buildah:v1.35.3 + imagePullPolicy: Always workingDir: $(params.shp-source-root) securityContext: privileged: true diff --git a/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml b/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml index 2219c2400c..e96b1c978e 100644 --- a/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml +++ b/samples/v1beta1/buildstrategy/buildah/buildstrategy_buildah_strategy_managed_push_cr.yaml @@ -7,6 +7,7 @@ spec: steps: - name: build-and-push image: quay.io/containers/buildah:v1.35.3 + imagePullPolicy: Always workingDir: $(params.shp-source-root) securityContext: capabilities: diff --git a/samples/v1beta1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml b/samples/v1beta1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml index c0015a5843..6630199b99 100644 --- a/samples/v1beta1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml +++ b/samples/v1beta1/buildstrategy/source-to-image/buildstrategy_source-to-image-redhat_cr.yaml @@ -24,6 +24,7 @@ spec: mountPath: /s2i - name: buildah image: quay.io/containers/buildah:v1.35.3 + imagePullPolicy: Always workingDir: /s2i securityContext: capabilities: