From 2a0e88002e7a850455f6b374f7c51e9dfe604cea Mon Sep 17 00:00:00 2001 From: Priti Kumari Date: Tue, 16 Jun 2020 16:26:49 +0530 Subject: [PATCH 1/3] Adding oc binary to bin path for multi stage test infra --- openshift-ci/build-root/Dockerfile | 4 ++++ openshift-ci/build-root/check-oc.sh | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100755 openshift-ci/build-root/check-oc.sh diff --git a/openshift-ci/build-root/Dockerfile b/openshift-ci/build-root/Dockerfile index 2579f3be023..f5ced258686 100644 --- a/openshift-ci/build-root/Dockerfile +++ b/openshift-ci/build-root/Dockerfile @@ -4,3 +4,7 @@ FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 RUN yum -y install make wget gcc git httpd-tools +# This is a temporary change to make sure that it should run on both template based as well as multi-stage test +# will remove this change once we completely migrate to multi-stage test infra +COPY ./check-oc.sh . +RUN chmod +x ./check-oc.sh diff --git a/openshift-ci/build-root/check-oc.sh b/openshift-ci/build-root/check-oc.sh new file mode 100755 index 00000000000..0f31fed6f00 --- /dev/null +++ b/openshift-ci/build-root/check-oc.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -x + +## Constants +OC_BINARY="./oc" + +# Copy oc binary to bin path +if [ -f $OC_BINARY ]; then + cp ./oc /usr/bin/oc +fi From 4e04f403cec5cff0594b4bac96f35cc0fe6c90f5 Mon Sep 17 00:00:00 2001 From: Priti Kumari Date: Wed, 17 Jun 2020 12:08:01 +0530 Subject: [PATCH 2/3] Added file permission locally and excluding it from docker file --- openshift-ci/build-root/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openshift-ci/build-root/Dockerfile b/openshift-ci/build-root/Dockerfile index f5ced258686..8dacf86f35d 100644 --- a/openshift-ci/build-root/Dockerfile +++ b/openshift-ci/build-root/Dockerfile @@ -6,5 +6,5 @@ RUN yum -y install make wget gcc git httpd-tools # This is a temporary change to make sure that it should run on both template based as well as multi-stage test # will remove this change once we completely migrate to multi-stage test infra -COPY ./check-oc.sh . -RUN chmod +x ./check-oc.sh +COPY openshift-ci/build-root/check-oc.sh . +RUN ./check-oc.sh From a58fe36b030043b7f4d530583f09b7c07959e1d7 Mon Sep 17 00:00:00 2001 From: Priti Kumari Date: Mon, 22 Jun 2020 10:57:05 +0530 Subject: [PATCH 3/3] Created different dockerfile to avoid master break and proceed with multistage changes --- openshift-ci/build-root/Dockerfile | 4 ---- openshift-ci/build-root/multistage/Dockerfile | 10 ++++++++++ openshift-ci/build-root/{ => multistage}/check-oc.sh | 0 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 openshift-ci/build-root/multistage/Dockerfile rename openshift-ci/build-root/{ => multistage}/check-oc.sh (100%) diff --git a/openshift-ci/build-root/Dockerfile b/openshift-ci/build-root/Dockerfile index 8dacf86f35d..2579f3be023 100644 --- a/openshift-ci/build-root/Dockerfile +++ b/openshift-ci/build-root/Dockerfile @@ -4,7 +4,3 @@ FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 RUN yum -y install make wget gcc git httpd-tools -# This is a temporary change to make sure that it should run on both template based as well as multi-stage test -# will remove this change once we completely migrate to multi-stage test infra -COPY openshift-ci/build-root/check-oc.sh . -RUN ./check-oc.sh diff --git a/openshift-ci/build-root/multistage/Dockerfile b/openshift-ci/build-root/multistage/Dockerfile new file mode 100644 index 00000000000..8dacf86f35d --- /dev/null +++ b/openshift-ci/build-root/multistage/Dockerfile @@ -0,0 +1,10 @@ +# Dockerfile to bootstrap build and test in openshift-ci + +FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 + +RUN yum -y install make wget gcc git httpd-tools + +# This is a temporary change to make sure that it should run on both template based as well as multi-stage test +# will remove this change once we completely migrate to multi-stage test infra +COPY openshift-ci/build-root/check-oc.sh . +RUN ./check-oc.sh diff --git a/openshift-ci/build-root/check-oc.sh b/openshift-ci/build-root/multistage/check-oc.sh similarity index 100% rename from openshift-ci/build-root/check-oc.sh rename to openshift-ci/build-root/multistage/check-oc.sh