From 2f6400fe57bcf6effa8219eec4181d39077ca078 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 14 May 2021 14:53:16 +0200 Subject: [PATCH] ci: add mirror-images container image for automated mirroring The ImageStream and BuildConfig use the Containerfile to build a container image in the OpenShift registry so that automated image mirroring can be configured. Signed-off-by: Niels de Vos --- mirror/Containerfile | 14 ++++++++++++++ mirror/mirror-buildconfig.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 mirror/Containerfile create mode 100644 mirror/mirror-buildconfig.yaml diff --git a/mirror/Containerfile b/mirror/Containerfile new file mode 100644 index 000000000..efedeeb2d --- /dev/null +++ b/mirror/Containerfile @@ -0,0 +1,14 @@ +FROM centos:latest + +RUN true \ + && yum -y install skopeo \ + && yum -y clean all \ + && true + +ADD images.txt /opt/mirror/ +ADD mirror-images.sh /opt/mirror/ + +ENV HOME=/opt/mirror +WORKDIR /opt/mirror + +CMD ["./mirror-images.sh"] diff --git a/mirror/mirror-buildconfig.yaml b/mirror/mirror-buildconfig.yaml new file mode 100644 index 000000000..96a0347e3 --- /dev/null +++ b/mirror/mirror-buildconfig.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: v1 +kind: ImageStream +metadata: + name: mirror-images + labels: + app: mirror-images +spec: + tags: + - name: latest +--- +apiVersion: v1 +kind: BuildConfig +metadata: + name: mirror-images + labels: + app: mirror-images +spec: + runPolicy: Serial + source: + git: + uri: https://github.com/ceph/ceph-csi + ref: ci/centos + contextDir: mirror + strategy: + dockerStrategy: + dockerfilePath: Containerfile + output: + to: + kind: ImageStreamTag + name: mirror-images:latest