Fix kubectl/oc install in container image

The binaries were only installed on the builder image.  This change
installs them on the executor image.

Change-Id: I86f7102218a77908c02b7da8a913fd20d417794d
This commit is contained in:
James E. Blair 2020-02-11 13:07:39 -08:00
parent 1f09f22c15
commit 821cff92e2
1 changed files with 4 additions and 6 deletions

View File

@ -34,12 +34,8 @@ RUN /output/install-from-bindep && zuul-manage-ansible
RUN mkdir /tmp/openshift-install \
&& curl -L $OPENSHIFT_URL -o /tmp/openshift-install/openshift-client.tgz \
&& cd /tmp/openshift-install/ \
&& echo $OPENSHIFT_SHA openshift-client.tgz | sha256sum --check \
&& tar xvfz openshift-client.tgz \
&& cp */kubectl /usr/local/bin \
&& cp */oc /usr/local/bin \
&& cd / \
&& rm -fr /tmp/openshift-install
&& echo $OPENSHIFT_SHA /tmp/openshift-install/openshift-client.tgz | sha256sum --check \
&& tar xvfz openshift-client.tgz --strip-components=1 -C /tmp/openshift-install
FROM opendevorg/python-base as zuul
@ -59,6 +55,8 @@ CMD ["/usr/local/bin/zuul"]
FROM zuul as zuul-executor
COPY --from=builder /usr/local/lib/zuul/ /usr/local/lib/zuul
COPY --from=builder /tmp/openshift-install/kubectl /usr/local/bin/kubectl
COPY --from=builder /tmp/openshift-install/oc /usr/local/bin/oc
CMD ["/usr/local/bin/zuul-executor"]