diff --git a/task/buildah-oci-ta/0.2/buildah-oci-ta.yaml b/task/buildah-oci-ta/0.2/buildah-oci-ta.yaml index 6b22caff88..98d25feb48 100644 --- a/task/buildah-oci-ta/0.2/buildah-oci-ta.yaml +++ b/task/buildah-oci-ta/0.2/buildah-oci-ta.yaml @@ -556,12 +556,14 @@ spec: - SETFCAP - name: icm image: quay.io/konflux-ci/icm-injection-scripts:latest@sha256:462980e94ba689b5f56c3d5dfb3358cd8c685300daf65a71532f11898935e7f1 - args: - - $(params.IMAGE) workingDir: /var/workdir volumeMounts: - mountPath: /var/lib/containers name: varlibcontainers + script: | + #!/bin/bash + set -euo pipefail + /scripts/inject-icm.sh "$IMAGE" securityContext: capabilities: add: diff --git a/task/buildah-remote-oci-ta/0.2/buildah-remote-oci-ta.yaml b/task/buildah-remote-oci-ta/0.2/buildah-remote-oci-ta.yaml index faff8a05a5..79105a5e12 100644 --- a/task/buildah-remote-oci-ta/0.2/buildah-remote-oci-ta.yaml +++ b/task/buildah-remote-oci-ta/0.2/buildah-remote-oci-ta.yaml @@ -649,11 +649,17 @@ spec: name: ssh readOnly: true workingDir: /var/workdir - - args: - - $(params.IMAGE) - computeResources: {} + - computeResources: {} image: quay.io/konflux-ci/icm-injection-scripts:latest@sha256:462980e94ba689b5f56c3d5dfb3358cd8c685300daf65a71532f11898935e7f1 name: icm + script: | + #!/bin/bash + set -euo pipefail + if [ "${IMAGE_APPEND_PLATFORM}" == "true" ]; then + IMAGE="${IMAGE}-${PLATFORM//[^a-zA-Z0-9]/-}" + export IMAGE + fi + /scripts/inject-icm.sh "$IMAGE" securityContext: capabilities: add: diff --git a/task/buildah-remote/0.2/buildah-remote.yaml b/task/buildah-remote/0.2/buildah-remote.yaml index 363d0884f5..ef885af6b4 100644 --- a/task/buildah-remote/0.2/buildah-remote.yaml +++ b/task/buildah-remote/0.2/buildah-remote.yaml @@ -625,11 +625,17 @@ spec: name: ssh readOnly: true workingDir: $(workspaces.source.path) - - args: - - $(params.IMAGE) - computeResources: {} + - computeResources: {} image: quay.io/konflux-ci/icm-injection-scripts:latest@sha256:462980e94ba689b5f56c3d5dfb3358cd8c685300daf65a71532f11898935e7f1 name: icm + script: | + #!/bin/bash + set -euo pipefail + if [ "${IMAGE_APPEND_PLATFORM}" == "true" ]; then + IMAGE="${IMAGE}-${PLATFORM//[^a-zA-Z0-9]/-}" + export IMAGE + fi + /scripts/inject-icm.sh "$IMAGE" securityContext: capabilities: add: diff --git a/task/buildah/0.2/buildah.yaml b/task/buildah/0.2/buildah.yaml index 266c92c319..214314fd72 100644 --- a/task/buildah/0.2/buildah.yaml +++ b/task/buildah/0.2/buildah.yaml @@ -502,7 +502,10 @@ spec: - mountPath: /var/lib/containers name: varlibcontainers workingDir: $(workspaces.source.path) - args: [$(params.IMAGE)] + script: | + #!/bin/bash + set -euo pipefail + /scripts/inject-icm.sh "$IMAGE" - name: push image: quay.io/konflux-ci/buildah-task:latest@sha256:b2d6c32d1e05e91920cd4475b2761d58bb7ee11ad5dff3ecb59831c7572b4d0c script: |