From 4a53926a2415fcea791426cf850f8c916a28259b Mon Sep 17 00:00:00 2001 From: Piyush Garg Date: Wed, 20 May 2020 23:00:39 +0530 Subject: [PATCH] Fix image replacement This will fix the image replacement as the busybox and tianon/true image has sha also now --- openshift/resolve-yamls.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openshift/resolve-yamls.sh b/openshift/resolve-yamls.sh index 0d2360e94f6..2a165694ae4 100755 --- a/openshift/resolve-yamls.sh +++ b/openshift/resolve-yamls.sh @@ -32,10 +32,10 @@ function resolve_resources() { # # NOTE(chmou): We are using our owns stuff for external images : # - # tianon/true => openshift/ci-operator/tekton-images/nop/Dockerfile - # busybox => registry.access.redhat.com/ubi8/ubi-minimal:latest \ - sed -e "s,ko://,,g" -e "s%tianon/true%${registry_prefix}-nop:${image_tag}%" \ - -e "s%busybox%registry.access.redhat.com/ubi8/ubi-minimal:latest%" \ + # tianon/true@sha* => openshift/ci-operator/tekton-images/nop/Dockerfile + # busybox@sha* => registry.access.redhat.com/ubi8/ubi-minimal:latest \ + sed -e "s,ko://,,g" -e "s%tianon/true.*\(\"\)%${registry_prefix}-nop:${image_tag}%\1" \ + -e "s%busybox.*\(\"\)%registry.access.redhat.com/ubi8/ubi-minimal:latest%\1" \ -e "s%\(.* image:\)\(github.com\)\(.*\/\)\(.*\)%\1 ${registry_prefix}-\4:${image_tag}%" $yaml \ -r -e "s,github.com/tektoncd/pipeline/cmd/${image_regexp},${registry_prefix}-\1:${image_tag},g" \ > ${TMP} @@ -48,10 +48,10 @@ function resolve_resources() { # # NOTE(chmou): We are using our owns stuff for external images : # - # tianon/true => openshift/ci-operator/tekton-images/nop/Dockerfile - # busybox => registry.access.redhat.com/ubi8/ubi-minimal:latest \ - sed -e "s,ko://,,g" -e "s%tinaon/true%${registry_prefix}:tektoncd-pipeline-nop%" \ - -e "s%busybox%registry.access.redhat.com/ubi8/ubi-minimal:latest%" \ + # tianon/true@sha* => openshift/ci-operator/tekton-images/nop/Dockerfile + # busybox@sha* => registry.access.redhat.com/ubi8/ubi-minimal:latest \ + sed -e "s,ko://,,g" -e "s%tinaon/true.*\(\"\)%${registry_prefix}:tektoncd-pipeline-nop%\1" \ + -e "s%busybox.*\(\"\)%registry.access.redhat.com/ubi8/ubi-minimal:latest%\1" \ -e 's%\(.* image:\)\(github.com\)\(.*\/\)\(test\/\)\(.*\)%\1\2 \3\4test-\5%' $yaml \ -e "s%\(.* image:\)\(github.com\)\(.*\/\)\(.*\)%\1 ""$registry_prefix"'\:tektoncd-pipeline-\4%' \ -re "s,github.com/tektoncd/pipeline/cmd/${image_regexp},${registry_prefix}:tektoncd-pipeline-\1,g" \