From 63f4e2190cfbe948cf2f77f51a18dbf0b9c99d6a Mon Sep 17 00:00:00 2001 From: yangyang Date: Mon, 7 Aug 2023 16:17:00 +0800 Subject: [PATCH 1/5] Enable pre-merge test for cincinnati --- ...cincinnati-operator-bundle-dockerfile.yaml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml diff --git a/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml new file mode 100644 index 0000000000000..7ead8ffd10217 --- /dev/null +++ b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml @@ -0,0 +1,89 @@ +base_images: + base: + name: "4.13" + namespace: ocp + tag: base + operator-sdk: + name: "4.13" + namespace: origin + tag: operator-sdk +build_root: + image_stream_tag: + name: release + namespace: openshift + tag: golang-1.18 +images: +- dockerfile_path: build/Dockerfile + from: base + to: cincinnati-operator +- dockerfile_path: dev/Dockerfile + from: base + to: cincinnati-graph-data-container +operator: + bundles: + - as: cincinnati-operator-bundle + dockerfile_path: bundle.Dockerfile + skip_building_index: true + substitutions: + - pullspec: quay.io/cincinnati/cincinnati:latest + with: pipeline:cincinnati_operand_latest + - pullspec: controller:latest + with: pipeline:cincinnati-operator +releases: + latest: + release: + channel: candidate + version: "4.14" + thirteen: + release: + channel: candidate + version: "4.13" + twelve: + release: + channel: candidate + version: "4.12" +resources: + '*': + limits: + memory: 4Gi + requests: + cpu: 100m + memory: 200Mi +tests: +- as: install-bundle + cluster_claim: + architecture: amd64 + cloud: aws + owner: openshift-ci + product: ocp + timeout: 1h0m0s + version: "4.13" + steps: + test: + - as: install + cli: latest + commands: | + oc create namespace install-osus-here + operator-sdk run bundle -n install-osus-here "$OO_BUNDLE" + oc wait --for condition=Available -n install-osus-here deployment my-operator + dependencies: + - env: OO_BUNDLE + name: cincinnati-operator-bundle + from: operator-sdk + resources: + requests: + cpu: 500m + memory: 1000Mi + - as: run-test + cli: latest + commands: run-e2e.sh + from: src + resources: + requests: + cpu: 500m + memory: 1000Mi + workflow: generic-claim +zz_generated_metadata: + branch: bundle-dockerfile + org: openshift + repo: cincinnati-operator From 8d902f6ca4fafb56434e9584c8c311007a43af3c Mon Sep 17 00:00:00 2001 From: Petr Muller Date: Tue, 8 Aug 2023 19:16:34 +0200 Subject: [PATCH 2/5] `make generate` --- ...operator-bundle-dockerfile-presubmits.yaml | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 ci-operator/jobs/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile-presubmits.yaml diff --git a/ci-operator/jobs/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile-presubmits.yaml b/ci-operator/jobs/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile-presubmits.yaml new file mode 100644 index 0000000000000..47b41216281a8 --- /dev/null +++ b/ci-operator/jobs/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile-presubmits.yaml @@ -0,0 +1,163 @@ +presubmits: + openshift/cincinnati-operator: + - agent: kubernetes + always_run: true + branches: + - ^bundle-dockerfile$ + - ^bundle-dockerfile- + cluster: build01 + context: ci/prow/ci-bundle-cincinnati-operator-bundle + 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-cincinnati-operator-bundle-dockerfile-ci-bundle-cincinnati-operator-bundle + rerun_command: /test ci-bundle-cincinnati-operator-bundle + 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=cincinnati-operator-bundle + 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( | .* )ci-bundle-cincinnati-operator-bundle,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^bundle-dockerfile$ + - ^bundle-dockerfile- + 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-cincinnati-operator-bundle-dockerfile-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: + - ^bundle-dockerfile$ + - ^bundle-dockerfile- + cluster: build01 + context: ci/prow/install-bundle + 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-cincinnati-operator-bundle-dockerfile-install-bundle + rerun_command: /test install-bundle + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --hive-kubeconfig=/secrets/hive-hive-credentials/kubeconfig + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=install-bundle + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/hive-hive-credentials + name: hive-hive-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: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: hive-hive-credentials + secret: + secretName: hive-hive-credentials + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )install-bundle,?($|\s.*) From e3531a6b6bd367e9a50e78b8ec7abcae4bda4cf1 Mon Sep 17 00:00:00 2001 From: Petr Muller Date: Tue, 8 Aug 2023 19:28:26 +0200 Subject: [PATCH 3/5] Dont substitute operand for now --- .../openshift-cincinnati-operator-bundle-dockerfile.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml index 7ead8ffd10217..c5472234b69e1 100644 --- a/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml +++ b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml @@ -25,8 +25,6 @@ operator: dockerfile_path: bundle.Dockerfile skip_building_index: true substitutions: - - pullspec: quay.io/cincinnati/cincinnati:latest - with: pipeline:cincinnati_operand_latest - pullspec: controller:latest with: pipeline:cincinnati-operator releases: From d8b21d8574bd2233c2acdd98c988cdc98d62dd09 Mon Sep 17 00:00:00 2001 From: Petr Muller Date: Tue, 8 Aug 2023 19:47:30 +0200 Subject: [PATCH 4/5] Fix deployment name to wait for --- .../openshift-cincinnati-operator-bundle-dockerfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml index c5472234b69e1..2d44c4b5b8d7d 100644 --- a/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml +++ b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml @@ -63,7 +63,7 @@ tests: commands: | oc create namespace install-osus-here operator-sdk run bundle -n install-osus-here "$OO_BUNDLE" - oc wait --for condition=Available -n install-osus-here deployment my-operator + oc wait --for condition=Available -n install-osus-here deployment updateservice-operator dependencies: - env: OO_BUNDLE name: cincinnati-operator-bundle From aabf16f5c3f946b9b30f2c70a6f0379abe8313aa Mon Sep 17 00:00:00 2001 From: Petr Muller Date: Wed, 9 Aug 2023 17:59:43 +0200 Subject: [PATCH 5/5] Update openshift-cincinnati-operator-bundle-dockerfile.yaml --- .../openshift-cincinnati-operator-bundle-dockerfile.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml index 2d44c4b5b8d7d..2d484a037e449 100644 --- a/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml +++ b/ci-operator/config/openshift/cincinnati-operator/openshift-cincinnati-operator-bundle-dockerfile.yaml @@ -72,14 +72,6 @@ tests: requests: cpu: 500m memory: 1000Mi - - as: run-test - cli: latest - commands: run-e2e.sh - from: src - resources: - requests: - cpu: 500m - memory: 1000Mi workflow: generic-claim zz_generated_metadata: branch: bundle-dockerfile