diff --git a/ci/Dockerfile b/ci/Dockerfile deleted file mode 100644 index 913096e1..00000000 --- a/ci/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10 AS builder -WORKDIR /go/src/github.com/openshift/os -COPY . . -# Prevent go mod from requiring a vendor directory. -ENV GOFLAGS=-mod=mod -# Compile our layering test binary for future use. -RUN go test -v -c -o layering_test ./tests/layering - -FROM registry.svc.ci.openshift.org/coreos/coreos-assembler:latest -WORKDIR /src -ENV COSA_DIR=/tmp/cosa -# Prow doesn't support emptydir for jobs today -ENV COSA_SKIP_OVERLAY=1 -COPY --from=builder /go/src/github.com/openshift/os/layering_test /usr/local/bin/layering_test -COPY . . -RUN mkdir -p "${COSA_DIR}" -# We need to make sure that root can read / write to the COSA_DIR so that -# when this container is actually run, we have permissions to read and -# write to the COSA_DIR to allow the Kola tests to run. -USER root -RUN chgrp -Rf root "${COSA_DIR}" && \ - chmod -Rf g+w "${COSA_DIR}" -USER builder -WORKDIR /tmp/cosa diff --git a/ci/Dockerfile.cosa-build b/ci/Dockerfile.cosa-build deleted file mode 100644 index 263fd28f..00000000 --- a/ci/Dockerfile.cosa-build +++ /dev/null @@ -1,34 +0,0 @@ -# This stage actually builds the RHCOS OCI image. However, due to -# limitations within OpenShift CI, we need to do the following: -# 1. Disable KVM by using the COSA_NO_KVM env var. This is due to OpenShift -# CI using the default OpenShift Docker Build strategy, which precludes us -# from mounting /dev/kvm into the build context. -# 2. Due to a limitation in the version of Buildah that OpenShift Builds -# uses (at the time of this writing, it uses a v1.23.z version of Buildah), -# we cannot mount the build context into the container build (e.g., `RUN -# --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared -# `), which would allow it to mutate the build context. This is due to -# https://github.com/containers/buildah/pull/3548 not being present. -# For now, this necessitates passing this image into the cosa-build image -# build below to extract the OCI archive and inject it into the -# ImageStream. However, once the OpenShift CI system is upgraded to use -# OpenShift 4.11, we can create the RHCOS image in a single shot via this -# stage. -FROM build-test-qemu-img:latest -ENV COSA_DIR=/tmp/cosa -ENV COSA_SKIP_OVERLAY=1 -RUN mkdir -p "${COSA_DIR}" && \ - COSA_NO_KVM=1 /src/ci/prow-entrypoint.sh build && \ - rm -rf "${COSA_DIR}/cache" -# We need to make sure that root can read / write to the COSA_DIR so that -# when this container is actually run, we have permissions to read and -# write to the COSA_DIR to allow the Kola tests to run. -# Note: In Docker BuildKit, this would double the image size because this -# would create an additional layer. However, since OpenShift Image Builds -# use Buildah, this is eliminated because it squashes these layers -# together. -USER root -RUN chgrp -Rf root "${COSA_DIR}" && \ - chmod -Rf g+w "${COSA_DIR}" -USER builder -WORKDIR /tmp/cosa diff --git a/ci/Dockerfile.cosa-oci-archive b/ci/Dockerfile.cosa-oci-archive deleted file mode 100644 index 3e3ccd8a..00000000 --- a/ci/Dockerfile.cosa-oci-archive +++ /dev/null @@ -1,10 +0,0 @@ -# We need the OCI archive to be somewhere with a predictable place with a constant -# path. However, the Kola tests expect the OCI archive to have the build -# number included in the filename. With that in mind, this image build will -# extract the RHCOS OCI archive from the cosa-build archive and place it in -# a constant path for extraction by the machine-os-oci-content image build. -FROM cosa-build:latest AS base -RUN /src/ci/simplify-ociarchive-path.sh - -FROM scratch -COPY --from=base /tmp/cosa/builds/latest/x86_64/rhcos.x86_64.ociarchive /tmp/cosa/builds/latest/x86_64/rhcos.x86_64.ociarchive diff --git a/ci/Dockerfile.layering-test b/ci/Dockerfile.layering-test deleted file mode 100644 index f761106b..00000000 --- a/ci/Dockerfile.layering-test +++ /dev/null @@ -1,6 +0,0 @@ -# Create a slimmer Fedora-based image for the layering test binary. This is -# intended to make the startup of the OS layering test faster since we -# won't have to pull the larger build-test-qemu-img. -FROM build-test-qemu-img:latest AS base -FROM registry.ci.openshift.org/coreos/fedora:35 AS final -COPY --from=base /usr/local/bin/layering_test /usr/local/bin/layering_test diff --git a/ci/Dockerfile.machine-os-oci-content b/ci/Dockerfile.machine-os-oci-content deleted file mode 100644 index ddd831e6..00000000 --- a/ci/Dockerfile.machine-os-oci-content +++ /dev/null @@ -1,12 +0,0 @@ -# This extracts the OCI archive from the cosa-build image build, injects it -# into the build context, and then uses that OCI archive as this image. -# This makes use of the following: -# - OpenShift Image Builds allows one to pass in a path from another container -# image. It places this under /tmp/build/inputs/. See: -# https://github.com/openshift/builder/blob/37525a77fa07e26c420962dee47193d672ef0b35/pkg/build/builder/common.go#L72 -# - Buildah allows one to use oci-archive as a transport. See: -# https://www.redhat.com/sysadmin/7-transports-features -# - Utilizing the above features in concert with one another and using an -# absolute path to refer to the OCI archive in the build context allows us -# to "import" the OCI archive into the CI ImageStream. -FROM oci-archive:/tmp/build/inputs/magic/cosa/builds/latest/x86_64/rhcos.x86_64.ociarchive