From 753c31be3121fd0640b2da9c5c7b972376acc55d Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 22 Jun 2022 10:36:00 -0400 Subject: [PATCH] Delete `ocp/` directory This directory included Dockerfiles and manifests for running cosa as an OpenShift build via gangplank. We're not using that and are planning to phase out gangplank, so let's remove these files. Part of https://github.com/coreos/coreos-assembler/issues/2860. --- ocp/Dockerfile.buildconfig | 9 --- ocp/Dockerfile.dev | 15 ---- ocp/Makefile | 6 -- ocp/README.md | 5 -- ocp/cosa-bc.yaml | 101 --------------------------- ocp/cosa-image.yaml | 137 ------------------------------------- 6 files changed, 273 deletions(-) delete mode 100644 ocp/Dockerfile.buildconfig delete mode 100644 ocp/Dockerfile.dev delete mode 100644 ocp/Makefile delete mode 100644 ocp/README.md delete mode 100644 ocp/cosa-bc.yaml delete mode 100644 ocp/cosa-image.yaml diff --git a/ocp/Dockerfile.buildconfig b/ocp/Dockerfile.buildconfig deleted file mode 100644 index b3f1535425..0000000000 --- a/ocp/Dockerfile.buildconfig +++ /dev/null @@ -1,9 +0,0 @@ -FROM quay.io/openshift/origin-cli AS openshift-origin - -FROM quay.io/coreos-assembler/coreos-assembler:latest - -COPY --from=openshift-origin /usr/bin/oc /usr/bin - -WORKDIR /srv/ -USER builder -ENTRYPOINT ["/usr/bin/dumb-init", "/usr/bin/gangway"] diff --git a/ocp/Dockerfile.dev b/ocp/Dockerfile.dev deleted file mode 100644 index fab5f67788..0000000000 --- a/ocp/Dockerfile.dev +++ /dev/null @@ -1,15 +0,0 @@ -FROM quay.io/coreos-assembler/coreos-assembler:latest -WORKDIR /root/containerbuild - -USER root - -COPY ./ /root/containerbuild/ -RUN cd /root/containerbuild/gangplank && \ - make && \ - make install DESTDIR=/ && \ - install -v -D -t /usr/lib/coreos-assembler /root/containerbuild/src/*.{sh,txt} - -WORKDIR /srv/ - -USER builder -ENTRYPOINT ["/usr/bin/dumb-init", "/usr/bin/gangway"] diff --git a/ocp/Makefile b/ocp/Makefile deleted file mode 100644 index 817a6677dc..0000000000 --- a/ocp/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -.PHONY: build-bc-image build-dev -build-bc-image: - cd ../ && buildah bud -f ocp/Dockerfile.buildconfig -t quay.io/coreos-assembler/coreos-assembler:ocp - -build-dev: - cd ../ && buildah bud -f ocp/Dockerfile.dev -t quay.io/coreos-assembler/coreos-assembler:ocp-dev diff --git a/ocp/README.md b/ocp/README.md deleted file mode 100644 index d6d3a5ec8e..0000000000 --- a/ocp/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# COSA as a Custom Build - -With the `gangplank` command, COSA has the wire-framing to become a full-fledged "custom build strategy" for OpenShift. - - diff --git a/ocp/cosa-bc.yaml b/ocp/cosa-bc.yaml deleted file mode 100644 index 0aaea7eddf..0000000000 --- a/ocp/cosa-bc.yaml +++ /dev/null @@ -1,101 +0,0 @@ -apiVersion: v1 -kind: Template -labels: - app: cosa - template: cosa-template -metadata: - annotations: - description: CoreOS Assembler Images - openshift.io/display-name: CoreOS Assembler - tags: cosa,coreos-assembler - name: cosa-images - -parameters: - - description: Git source URI - name: REPO_URL - value: https://github.com/coreos/fedora-coreos-config - - description: Git branch/tag reference - name: REPO_REF - value: testing-devel - - description: Name of the image; use e.g. joe-cosa for your own build - name: IMAGE - value: coreos-assembler - - description: Image Tag to use - name: IMAGE_TAG - value: buildconfig-main - - description: Service Account - name: SA - value: cosa-builder - - description: Tag to use for this template - name: TAG - value: main - -objects: - -# Create the Service Account for COSA -- apiVersion: v1 - kind: ServiceAccount - metadata: - annotations: - coreos-assembler.coreos.com/type: "service account" - name: ${SA} - name: ${SA} - -# Gangplank uses similar permissions to Jenkins -- apiVersion: rbac.authorization.k8s.io/v1 - kind: RoleBinding - metadata: - name: coreos-builder-editor-0 - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: edit - subjects: - - kind: ServiceAccount - name: ${SA} - -- apiVersion: image.openshift.io/v1 - kind: ImageStream - metadata: - name: machine-os-content - spec: - lookupPolicy: - local: true - -# Create the basic build config -- apiVersion: build.openshift.io/v1 - kind: BuildConfig - metadata: - annotations: - labels: - app: cosa-runner - template: cosa-runner-template - name: cosa-runner-${TAG} - spec: - failedBuildsHistoryLimit: 25 - successfulBuildsHistoryLimit: 25 - nodeSelector: null - output: - to: - kind: ImageStreamTag - name: machine-os-content:latest - postCommit: {} - resources: {} - runPolicy: Parallel - serviceAccount: ${SA} - source: - git: - ref: ${REPO_REF} - uri: ${REPO_URL} - type: Git - strategy: - customStrategy: - env: - - name: COSA_CMDS - value: 'cosa fetch; cosa build;' - from: - kind: ImageStreamTag - name: ${IMAGE}:${IMAGE_TAG} - forcePull: true - type: Custom - triggers: [] diff --git a/ocp/cosa-image.yaml b/ocp/cosa-image.yaml deleted file mode 100644 index 964e7ea7f5..0000000000 --- a/ocp/cosa-image.yaml +++ /dev/null @@ -1,137 +0,0 @@ -# In this file, you will find the following: -# - ImageStream configs for importing Fedora images -# - ImageStream configs for importing coreos-assembler images -# - BuildConfig defining how coreos-assembler:main is built -# - BuildConfig defining how coreos-assembler:buildconfig is built -# -# To use this file, you would do something like the following: -# $ oc apply -f cosa-image.yaml -# -# It is possible to provide parameters used by the BuildConfig, e.g.: -# $ oc process -f cosa-image.yaml --param=REPO_REF=foo \ -# --param=NAMESPACE=bar | \ -# oc apply -f - -# -apiVersion: v1 -kind: Template -labels: - app: cosa - template: cosa-template -metadata: - annotations: - description: CoreOS Assembler Images - openshift.io/display-name: CoreOS Assembler - tags: cosa,coreos-assembler - name: cosa-images - -parameters: - - description: Git source URI - name: REPO_URL - value: "https://github.com/coreos/coreos-assembler" - - description: Git branch/tag reference - name: REPO_REF - value: "main" - - description: Name of the image; use e.g. joe-cosa for your own build - name: IMAGE - value: coreos-assembler - -objects: - - ### Fedora Caching ### - # keep a local copy of Fedora, since its use to build our Docker Images - - apiVersion: "image.openshift.io/v1" - kind: ImageStream - metadata: - name: fedora - labels: - app: cosa - template: cosa-template - spec: - failedBuildHistoryLimit: 1 - successfulBuildsHistoryLimit: 1 - lookupPolicy: - # this allows e.g. the pipeline to directly reference the imagestream - local: true - tags: - - from: - kind: DockerImage - name: 'registry.fedoraproject.org/fedora:33' - name: '33' - referencePolicy: - type: Source - importPolicy: - scheduled: true - - from: - kind: DockerImage - name: 'registry.fedoraproject.org/fedora:34' - name: '34' - referencePolicy: - type: Source - importPolicy: - scheduled: true - - ### COREOS-ASSEMBLER Import Stream - - apiVersion: image.openshift.io/v1 - kind: ImageStream - metadata: - name: ${IMAGE} - spec: - lookupPolicy: - local: true - failedBuildHistoryLimit: 1 - successfulBuildsHistoryLimit: 1 - lookupPolicy: - local: true - tags: - - name: ${REPO_REF} - from: - kind: DockerImage - name: quay.io/coreos-assembler/coreos-assembler:${REPO_REF} - importPolicy: - scheduled: true - - ### BuildConfig Master - - apiVersion: build.openshift.io/v1 - kind: BuildConfig - metadata: - labels: - app: ${IMAGE} - name: ${IMAGE}-bc-${REPO_REF} - spec: - # kill the build after 3hrs - completionDeadlineSeconds: 13200 - lookupPolicy: - local: true - output: - to: - kind: ImageStreamTag - name: ${IMAGE}:buildconfig-${REPO_REF} - postCommit: {} - runPolicy: Serial - source: - git: - ref: "${REPO_REF}" - uri: "${REPO_URL}" - type: Git - strategy: - dockerStrategy: - dockerfilePath: ocp/Dockerfile.buildconfig - env: - - name: GIT_URL - value: "${REPO_URL}" - - name: GIT_REF - value: "${REPO_REF}" - - name: OPENSHIFT_GIT_HACK - value: "TRUE" - from: - kind: ImageStreamTag - name: ${IMAGE}:${REPO_REF} - dockerfilePath: ocp/Dockerfile.buildconfig - type: Docker - triggers: - - type: ConfigChange - - type: "ImageChange" - imageChange: - from: - kind: "ImageStreamTag" - name: ${IMAGE}:${REPO_REF}