From f2195809e81c4102100cc5b6ad6262c87a1ead85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Suszy=C5=84ski?= Date: Fri, 10 Dec 2021 14:36:45 +0100 Subject: [PATCH 1/2] Adding kn-plugin-event to OpenShift CI --- ...-knative-kn-plugin-event-release-0.26.yaml | 20 +++++++- ...t-knative-kn-plugin-event-release-1.0.yaml | 20 +++++++- ...-knative-kn-plugin-event-release-next.yaml | 20 +++++++- ...-plugin-event-release-0.26-presubmits.yaml | 49 +++++++++++++++++++ ...n-plugin-event-release-1.0-presubmits.yaml | 49 +++++++++++++++++++ ...-plugin-event-release-next-presubmits.yaml | 49 +++++++++++++++++++ 6 files changed, 201 insertions(+), 6 deletions(-) diff --git a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml index c5480b37b3a9..f6cc6dd5a086 100644 --- a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml +++ b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml @@ -1,9 +1,25 @@ +base_images: + base: + name: ubi-minimal + namespace: ocp + tag: "8" binary_build_commands: | - export HOME=/tmp - ./mage build + go build -race -o /usr/bin/kn-event-sender ./cmd/kn-event-sender build_root: project_image: dockerfile_path: openshift/ci-operator/build-image/Dockerfile +images: +- dockerfile_literal: |- + FROM base + ADD kn-event-sender /usr/bin/kn-event-sender + ENTRYPOINT ["/usr/bin/kn-event-sender"] + from: base + inputs: + bin: + paths: + - destination_dir: . + source_path: /usr/bin/kn-event-sender + to: knative-client-plugin-event-sender releases: latest: release: diff --git a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml index b1e2036f4fed..9fb36069bb59 100644 --- a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml +++ b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml @@ -1,9 +1,25 @@ +base_images: + base: + name: ubi-minimal + namespace: ocp + tag: "8" binary_build_commands: | - export HOME=/tmp - ./mage build + go build -race -o /usr/bin/kn-event-sender ./cmd/kn-event-sender build_root: project_image: dockerfile_path: openshift/ci-operator/build-image/Dockerfile +images: +- dockerfile_literal: |- + FROM base + ADD kn-event-sender /usr/bin/kn-event-sender + ENTRYPOINT ["/usr/bin/kn-event-sender"] + from: base + inputs: + bin: + paths: + - destination_dir: . + source_path: /usr/bin/kn-event-sender + to: knative-client-plugin-event-sender releases: latest: release: diff --git a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml index ebd9e744fbc6..57f7316dd7fc 100644 --- a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml +++ b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml @@ -1,9 +1,25 @@ +base_images: + base: + name: ubi-minimal + namespace: ocp + tag: "8" binary_build_commands: | - export HOME=/tmp - ./mage build + go build -race -o /usr/bin/kn-event-sender ./cmd/kn-event-sender build_root: project_image: dockerfile_path: openshift/ci-operator/build-image/Dockerfile +images: +- dockerfile_literal: |- + FROM base + ADD kn-event-sender /usr/bin/kn-event-sender + ENTRYPOINT ["/usr/bin/kn-event-sender"] + from: base + inputs: + bin: + paths: + - destination_dir: . + source_path: /usr/bin/kn-event-sender + to: knative-client-plugin-event-sender releases: latest: release: diff --git a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-presubmits.yaml b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-presubmits.yaml index 7ea8702d0211..8d6e652a22bd 100644 --- a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-presubmits.yaml +++ b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-presubmits.yaml @@ -1,5 +1,54 @@ presubmits: openshift-knative/kn-plugin-event: + - agent: kubernetes + always_run: true + branches: + - ^release-0\.26$ + - ^release-0\.26- + cluster: build01 + context: ci/prow/images + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-knative-kn-plugin-event-release-0.26-images + rerun_command: /test images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: true branches: diff --git a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-presubmits.yaml b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-presubmits.yaml index 98823048e28b..59b9e7e34cda 100644 --- a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-presubmits.yaml +++ b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-presubmits.yaml @@ -1,5 +1,54 @@ presubmits: openshift-knative/kn-plugin-event: + - agent: kubernetes + always_run: true + branches: + - ^release-1\.0$ + - ^release-1\.0- + cluster: build01 + context: ci/prow/images + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-knative-kn-plugin-event-release-1.0-images + rerun_command: /test images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: true branches: diff --git a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-presubmits.yaml b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-presubmits.yaml index 84f1eabb2a80..4c4b3481e163 100644 --- a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-presubmits.yaml +++ b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-presubmits.yaml @@ -1,5 +1,54 @@ presubmits: openshift-knative/kn-plugin-event: + - agent: kubernetes + always_run: true + branches: + - ^release-next$ + - ^release-next- + cluster: build01 + context: ci/prow/images + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-knative-kn-plugin-event-release-next-images + rerun_command: /test images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: true branches: From c85ec20455a5c31a0f0f3117b20a60def4f8b8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Suszy=C5=84ski?= Date: Mon, 13 Dec 2021 13:48:32 +0100 Subject: [PATCH 2/2] Adding image promotion --- ...-knative-kn-plugin-event-release-0.26.yaml | 5 +- ...t-knative-kn-plugin-event-release-1.0.yaml | 5 +- ...-knative-kn-plugin-event-release-next.yaml | 5 +- ...plugin-event-release-0.26-postsubmits.yaml | 56 +++++++++++++++++++ ...-plugin-event-release-1.0-postsubmits.yaml | 56 +++++++++++++++++++ ...plugin-event-release-next-postsubmits.yaml | 56 +++++++++++++++++++ 6 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-postsubmits.yaml create mode 100644 ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-postsubmits.yaml create mode 100644 ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-postsubmits.yaml diff --git a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml index f6cc6dd5a086..2885d6736f8a 100644 --- a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml +++ b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26.yaml @@ -19,7 +19,10 @@ images: paths: - destination_dir: . source_path: /usr/bin/kn-event-sender - to: knative-client-plugin-event-sender + to: client-plugin-event-sender +promotion: + name: release-0.26 + namespace: openshift-knative releases: latest: release: diff --git a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml index 9fb36069bb59..e06af7bc0e46 100644 --- a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml +++ b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0.yaml @@ -19,7 +19,10 @@ images: paths: - destination_dir: . source_path: /usr/bin/kn-event-sender - to: knative-client-plugin-event-sender + to: client-plugin-event-sender +promotion: + name: release-1.0 + namespace: openshift-knative releases: latest: release: diff --git a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml index 57f7316dd7fc..b93f44c243ce 100644 --- a/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml +++ b/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next.yaml @@ -19,7 +19,10 @@ images: paths: - destination_dir: . source_path: /usr/bin/kn-event-sender - to: knative-client-plugin-event-sender + to: client-plugin-event-sender +promotion: + name: release-next + namespace: openshift-knative releases: latest: release: diff --git a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-postsubmits.yaml b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-postsubmits.yaml new file mode 100644 index 000000000000..ff03bfaa124d --- /dev/null +++ b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-0.26-postsubmits.yaml @@ -0,0 +1,56 @@ +postsubmits: + openshift-knative/kn-plugin-event: + - agent: kubernetes + always_run: true + branches: + - ^release-0\.26$ + cluster: build02 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/is-promotion: "true" + ci.openshift.io/generator: prowgen + max_concurrency: 1 + name: branch-ci-openshift-knative-kn-plugin-event-release-0.26-images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson + - --promote + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/push-secret + name: push-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: push-secret + secret: + secretName: registry-push-credentials-ci-central + - name: result-aggregator + secret: + secretName: result-aggregator diff --git a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-postsubmits.yaml b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-postsubmits.yaml new file mode 100644 index 000000000000..1062bd0c3de0 --- /dev/null +++ b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-1.0-postsubmits.yaml @@ -0,0 +1,56 @@ +postsubmits: + openshift-knative/kn-plugin-event: + - agent: kubernetes + always_run: true + branches: + - ^release-1\.0$ + cluster: build02 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/is-promotion: "true" + ci.openshift.io/generator: prowgen + max_concurrency: 1 + name: branch-ci-openshift-knative-kn-plugin-event-release-1.0-images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson + - --promote + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/push-secret + name: push-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: push-secret + secret: + secretName: registry-push-credentials-ci-central + - name: result-aggregator + secret: + secretName: result-aggregator diff --git a/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-postsubmits.yaml b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-postsubmits.yaml new file mode 100644 index 000000000000..1778e48cc3d8 --- /dev/null +++ b/ci-operator/jobs/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next-postsubmits.yaml @@ -0,0 +1,56 @@ +postsubmits: + openshift-knative/kn-plugin-event: + - agent: kubernetes + always_run: true + branches: + - ^release-next$ + cluster: build02 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/is-promotion: "true" + ci.openshift.io/generator: prowgen + max_concurrency: 1 + name: branch-ci-openshift-knative-kn-plugin-event-release-next-images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson + - --promote + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/push-secret + name: push-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: push-secret + secret: + secretName: registry-push-credentials-ci-central + - name: result-aggregator + secret: + secretName: result-aggregator