Skip to content

Commit a87cf20

Browse files
committed
buildah*/0.3: port icm fix from buildah/0.2
See 2ac6602. The fix got lost while creating the 0.3 version of buildah. Signed-off-by: Adam Cmiel <[email protected]>
1 parent bb14eed commit a87cf20

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

task/buildah-oci-ta/0.3/buildah-oci-ta.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,14 @@ spec:
556556
- SETFCAP
557557
- name: icm
558558
image: quay.io/konflux-ci/icm-injection-scripts:latest@sha256:462980e94ba689b5f56c3d5dfb3358cd8c685300daf65a71532f11898935e7f1
559-
args:
560-
- $(params.IMAGE)
561559
workingDir: /var/workdir
562560
volumeMounts:
563561
- mountPath: /var/lib/containers
564562
name: varlibcontainers
563+
script: |
564+
#!/bin/bash
565+
set -euo pipefail
566+
/scripts/inject-icm.sh "$IMAGE"
565567
securityContext:
566568
capabilities:
567569
add:

task/buildah-remote-oci-ta/0.3/buildah-remote-oci-ta.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,17 @@ spec:
661661
name: ssh
662662
readOnly: true
663663
workingDir: /var/workdir
664-
- args:
665-
- $(params.IMAGE)
666-
computeResources: {}
664+
- computeResources: {}
667665
image: quay.io/konflux-ci/icm-injection-scripts:latest@sha256:462980e94ba689b5f56c3d5dfb3358cd8c685300daf65a71532f11898935e7f1
668666
name: icm
667+
script: |
668+
#!/bin/bash
669+
set -euo pipefail
670+
if [ "${IMAGE_APPEND_PLATFORM}" == "true" ]; then
671+
IMAGE="${IMAGE}-${PLATFORM//[^a-zA-Z0-9]/-}"
672+
export IMAGE
673+
fi
674+
/scripts/inject-icm.sh "$IMAGE"
669675
securityContext:
670676
capabilities:
671677
add:

task/buildah-remote/0.3/buildah-remote.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,17 @@ spec:
637637
name: ssh
638638
readOnly: true
639639
workingDir: $(workspaces.source.path)
640-
- args:
641-
- $(params.IMAGE)
642-
computeResources: {}
640+
- computeResources: {}
643641
image: quay.io/konflux-ci/icm-injection-scripts:latest@sha256:462980e94ba689b5f56c3d5dfb3358cd8c685300daf65a71532f11898935e7f1
644642
name: icm
643+
script: |
644+
#!/bin/bash
645+
set -euo pipefail
646+
if [ "${IMAGE_APPEND_PLATFORM}" == "true" ]; then
647+
IMAGE="${IMAGE}-${PLATFORM//[^a-zA-Z0-9]/-}"
648+
export IMAGE
649+
fi
650+
/scripts/inject-icm.sh "$IMAGE"
645651
securityContext:
646652
capabilities:
647653
add:

task/buildah/0.3/buildah.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,10 @@ spec:
503503
- mountPath: /var/lib/containers
504504
name: varlibcontainers
505505
workingDir: $(workspaces.source.path)
506-
args: [$(params.IMAGE)]
506+
script: |
507+
#!/bin/bash
508+
set -euo pipefail
509+
/scripts/inject-icm.sh "$IMAGE"
507510
- name: push
508511
image: quay.io/konflux-ci/buildah-task:latest@sha256:b2d6c32d1e05e91920cd4475b2761d58bb7ee11ad5dff3ecb59831c7572b4d0c
509512
script: |

0 commit comments

Comments
 (0)