Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ function build_tools() {
oc_archive="openshift-client-linux.tar.gz"
oc_url="https://mirror.openshift.com/pub/openshift-v4/${TARGET_ARCH}/clients/ocp/${ocp_version}/${oc_archive}"

mco_arch=$([ "${TARGET_ARCH}" = "amd64" ] && echo "x86_64" || echo "${TARGET_ARCH}")
mco_sanitize_url="https://openshift-mirror-list.ci-systems.workers.dev/pub/ci/${mco_arch}/mco-sanitize/mco-sanitize"

podman build --platform "${platform}" \
--manifest "${manifest}" \
-f "${build_root}"/Containerfile \
Expand All @@ -101,6 +104,7 @@ function build_tools() {
--build-arg=CAMGI_TAR="${camgi_archive}" \
--build-arg=OC_TAR="${oc_archive}" \
--build-arg=OC_URL="${oc_url}" \
--build-arg=MCO_SANITIZE_URL="${mco_sanitize_url}" \
--build-arg=QUAY_EXPIRATION="${IMAGE_EXPIRE_TIME}" \
--build-arg=TARGETPLATFORM="${platform}" \
--build-arg=TARGETARCH="${TARGET_ARCH}" \
Expand Down
11 changes: 3 additions & 8 deletions tools/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,8 @@ COPY --from=clients /clients/oc /usr/bin/oc
COPY --from=clients /clients/jq /usr/bin/jq
COPY --from=clients /clients/camgi /usr/bin/camgi

RUN MCO_ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64";; *) echo "";; esac) && \
if [ -n "${MCO_ARCH}" ]; then \
curl -sSLf -o /usr/bin/mco-sanitize \
"https://openshift-mirror-list.ci-systems.workers.dev/pub/ci/${MCO_ARCH}/mco-sanitize/mco-sanitize" && \
chmod +x /usr/bin/mco-sanitize; \
else \
echo "mco-sanitize not available for ${TARGETARCH}, skipping"; \
fi
ARG MCO_SANITIZE_URL=TBD
ADD ${MCO_SANITIZE_URL} /usr/bin/mco-sanitize
RUN chmod +x /usr/bin/mco-sanitize
Comment thread
bshaw7 marked this conversation as resolved.

RUN ln -svf /usr/bin/oc /usr/bin/kubectl
Loading