From b6487b0341c290c49058630b4ebb37c20cd461ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Thu, 9 Jun 2022 19:37:26 +0200 Subject: [PATCH 1/2] ci-operator/openshift/os: Use src image instead of COSA for valdiate --- ci-operator/config/openshift/os/openshift-os-master.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/config/openshift/os/openshift-os-master.yaml b/ci-operator/config/openshift/os/openshift-os-master.yaml index d6e925f69bb26..7f0319c18515f 100644 --- a/ci-operator/config/openshift/os/openshift-os-master.yaml +++ b/ci-operator/config/openshift/os/openshift-os-master.yaml @@ -79,7 +79,7 @@ tests: - as: validate commands: ci/validate.sh container: - from: coreos_coreos-assembler_latest + from: src skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ - as: validate-built-image commands: cat /etc/os-release From d8548476dcd69e8a7ef8dcfdad292185f8e09d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Thu, 9 Jun 2022 19:38:03 +0200 Subject: [PATCH 2/2] ci-operator/openshift/os: Update build & test jobs --- .../openshift/os/openshift-os-master.yaml | 33 +-- .../os/openshift-os-master-presubmits.yaml | 210 +++++++----------- 2 files changed, 85 insertions(+), 158 deletions(-) diff --git a/ci-operator/config/openshift/os/openshift-os-master.yaml b/ci-operator/config/openshift/os/openshift-os-master.yaml index 7f0319c18515f..b378391c32aa7 100644 --- a/ci-operator/config/openshift/os/openshift-os-master.yaml +++ b/ci-operator/config/openshift/os/openshift-os-master.yaml @@ -77,7 +77,7 @@ resources: memory: 3Gi tests: - as: validate - commands: ci/validate.sh + commands: ci/prow-entrypoint.sh validate container: from: src skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ @@ -86,13 +86,13 @@ tests: container: from: machine-os-oci-content skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ -- as: test-qemu-nvme +- as: build-test-qemu-kola-basic cluster: build02 skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ steps: test: - as: test - commands: /src/ci/test-qemu-nvme.sh + commands: /src/ci/prow-entrypoint.sh build-test-qemu-kola-basic from: build-test-qemu-img resources: limits: @@ -101,13 +101,13 @@ tests: cpu: 2000m devices.kubevirt.io/kvm: "1" memory: 3Gi -- as: test-qemu-firmware-uefi +- as: build-test-qemu-kola-all cluster: build02 skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ steps: test: - as: test - commands: /src/ci/test-qemu-firmware-uefi.sh + commands: /src/ci/prow-entrypoint.sh build-test-qemu-kola-all from: build-test-qemu-img resources: limits: @@ -116,13 +116,13 @@ tests: cpu: 2000m devices.kubevirt.io/kvm: "1" memory: 3Gi -- as: test-qemu-kola-upgrade +- as: build-test-qemu-kola-upgrade cluster: build02 skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ steps: test: - as: test - commands: /src/ci/test-qemu-kola-upgrade.sh + commands: /src/ci/prow-entrypoint.sh build-test-qemu-kola-upgrade from: build-test-qemu-img resources: limits: @@ -131,28 +131,13 @@ tests: cpu: 2000m devices.kubevirt.io/kvm: "1" memory: 3Gi -- as: test-qemu-kola +- as: build-test-qemu-kola-metal cluster: build02 skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ steps: test: - as: test - commands: /src/ci/test-qemu-kola.sh - from: build-test-qemu-img - resources: - limits: - devices.kubevirt.io/kvm: "1" - requests: - cpu: 2000m - devices.kubevirt.io/kvm: "1" - memory: 3Gi -- as: test-qemu-metal - cluster: build02 - skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ - steps: - test: - - as: test - commands: /src/ci/test-qemu-metal.sh + commands: /src/ci/prow-entrypoint.sh build-test-qemu-kola-metal from: build-test-qemu-img resources: limits: diff --git a/ci-operator/jobs/openshift/os/openshift-os-master-presubmits.yaml b/ci-operator/jobs/openshift/os/openshift-os-master-presubmits.yaml index 4ef2995bc73ea..51c4a658939d4 100644 --- a/ci-operator/jobs/openshift/os/openshift-os-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/os/openshift-os-master-presubmits.yaml @@ -5,16 +5,17 @@ presubmits: branches: - ^master$ - ^master- - cluster: build04 - context: ci/prow/images + cluster: build02 + context: ci/prow/build-test-qemu-kola-all decorate: true decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-images - rerun_command: /test images + name: pull-ci-openshift-os-master-build-test-qemu-kola-all + rerun_command: /test build-test-qemu-kola-all skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ spec: containers: @@ -22,7 +23,8 @@ presubmits: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - - --target=[images] + - --secret-dir=/secrets/ci-pull-credentials + - --target=build-test-qemu-kola-all command: - ci-operator image: ci-operator:latest @@ -32,58 +34,9 @@ presubmits: 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 + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials 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: - - ^master$ - - ^master- - cluster: build04 - context: ci/prow/periodic-images - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/variant: periodic - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-periodic-images - rerun_command: /test periodic-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] - - --target=machine-os-oci-content - - --variant=periodic - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -95,43 +48,41 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )periodic-images,?($|\s.*) + trigger: (?m)^/test( | .* )build-test-qemu-kola-all,?($|\s.*) - agent: kubernetes always_run: false branches: - ^master$ - ^master- - cluster: build04 - context: ci/prow/test-in-cluster + cluster: build02 + context: ci/prow/build-test-qemu-kola-basic decorate: true decoration_config: skip_cloning: true - timeout: 4h30m0s labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-test-in-cluster - optional: true - rerun_command: /test test-in-cluster + name: pull-ci-openshift-os-master-build-test-qemu-kola-basic + rerun_command: /test build-test-qemu-kola-basic skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/test-in-cluster-cluster-profile - - --target=test-in-cluster + - --target=build-test-qemu-kola-basic command: - ci-operator image: ci-operator:latest @@ -141,14 +92,9 @@ presubmits: requests: cpu: 10m volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/test-in-cluster-cluster-profile - name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -160,36 +106,23 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - name: ci-pull-credentials secret: secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )test-in-cluster,?($|\s.*) + trigger: (?m)^/test( | .* )build-test-qemu-kola-basic,?($|\s.*) - agent: kubernetes always_run: false branches: - ^master$ - ^master- cluster: build02 - context: ci/prow/test-qemu-firmware-uefi + context: ci/prow/build-test-qemu-kola-metal decorate: true decoration_config: skip_cloning: true @@ -197,8 +130,8 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-test-qemu-firmware-uefi - rerun_command: /test test-qemu-firmware-uefi + name: pull-ci-openshift-os-master-build-test-qemu-kola-metal + rerun_command: /test build-test-qemu-kola-metal skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ spec: containers: @@ -207,7 +140,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=test-qemu-firmware-uefi + - --target=build-test-qemu-kola-metal command: - ci-operator image: ci-operator:latest @@ -240,14 +173,14 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )test-qemu-firmware-uefi,?($|\s.*) + trigger: (?m)^/test( | .* )build-test-qemu-kola-metal,?($|\s.*) - agent: kubernetes always_run: false branches: - ^master$ - ^master- cluster: build02 - context: ci/prow/test-qemu-kola + context: ci/prow/build-test-qemu-kola-upgrade decorate: true decoration_config: skip_cloning: true @@ -255,8 +188,8 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-test-qemu-kola - rerun_command: /test test-qemu-kola + name: pull-ci-openshift-os-master-build-test-qemu-kola-upgrade + rerun_command: /test build-test-qemu-kola-upgrade skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ spec: containers: @@ -265,7 +198,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=test-qemu-kola + - --target=build-test-qemu-kola-upgrade command: - ci-operator image: ci-operator:latest @@ -298,23 +231,22 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )test-qemu-kola,?($|\s.*) + trigger: (?m)^/test( | .* )build-test-qemu-kola-upgrade,?($|\s.*) - agent: kubernetes always_run: false branches: - ^master$ - ^master- - cluster: build02 - context: ci/prow/test-qemu-kola-upgrade + cluster: build04 + context: ci/prow/images decorate: true decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-test-qemu-kola-upgrade - rerun_command: /test test-qemu-kola-upgrade + name: pull-ci-openshift-os-master-images + rerun_command: /test images skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ spec: containers: @@ -322,8 +254,7 @@ presubmits: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --target=test-qemu-kola-upgrade + - --target=[images] command: - ci-operator image: ci-operator:latest @@ -333,9 +264,6 @@ presubmits: requests: cpu: 10m volumeMounts: - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -347,41 +275,38 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )test-qemu-kola-upgrade,?($|\s.*) + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes - always_run: false + always_run: true branches: - ^master$ - ^master- - cluster: build02 - context: ci/prow/test-qemu-metal + cluster: build04 + context: ci/prow/periodic-images decorate: true decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cluster: build02 + ci-operator.openshift.io/variant: periodic ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-test-qemu-metal - rerun_command: /test test-qemu-metal - skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ + name: pull-ci-openshift-os-master-periodic-images + rerun_command: /test periodic-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 - - --secret-dir=/secrets/ci-pull-credentials - - --target=test-qemu-metal + - --target=[images] + - --target=machine-os-oci-content + - --variant=periodic command: - ci-operator image: ci-operator:latest @@ -391,9 +316,6 @@ presubmits: requests: cpu: 10m volumeMounts: - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -405,41 +327,43 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )test-qemu-metal,?($|\s.*) + trigger: (?m)^/test( | .* )periodic-images,?($|\s.*) - agent: kubernetes always_run: false branches: - ^master$ - ^master- - cluster: build02 - context: ci/prow/test-qemu-nvme + cluster: build04 + context: ci/prow/test-in-cluster decorate: true decoration_config: skip_cloning: true + timeout: 4h30m0s labels: - ci-operator.openshift.io/cluster: build02 + ci-operator.openshift.io/cloud: gcp + ci-operator.openshift.io/cloud-cluster-profile: gcp ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-os-master-test-qemu-nvme - rerun_command: /test test-qemu-nvme + name: pull-ci-openshift-os-master-test-in-cluster + optional: true + rerun_command: /test test-in-cluster skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=test-qemu-nvme + - --secret-dir=/usr/local/test-in-cluster-cluster-profile + - --target=test-in-cluster command: - ci-operator image: ci-operator:latest @@ -449,9 +373,14 @@ presubmits: requests: cpu: 10m volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true + - mountPath: /usr/local/test-in-cluster-cluster-profile + name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -463,16 +392,29 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials - name: ci-pull-credentials secret: secretName: ci-pull-credentials + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-gcp + - configMap: + name: cluster-profile-gcp - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )test-qemu-nvme,?($|\s.*) + trigger: (?m)^/test( | .* )test-in-cluster,?($|\s.*) - agent: kubernetes always_run: false branches: