From 8bff86e9d12647812b64533076473a133087bb58 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Mon, 10 Apr 2023 11:23:58 -0500 Subject: [PATCH 1/4] specify the golangling-ci cache location to fix access perms --- .../microshift/openshift-microshift-main.yaml | 15 ++++++ .../openshift-microshift-main-presubmits.yaml | 50 +++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml index ab04638e0e7dc..e95f9d9749d74 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml @@ -113,6 +113,21 @@ tests: commands: make verify container: from: src +- as: verify-go + cluster: build02 + steps: + test: + - as: verify-go-cache + commands: make verify-go + from: src + env: + - default: "/tmp/" + name: GOLANGCI_LINT_CACHE + documentation: "" + resources: + requests: + cpu: 100m + memory: 200Mi - as: test-unit cluster: build02 commands: make test-unit diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml index 5e7d70b602212..f07b366eeaa79 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml @@ -1007,3 +1007,53 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )verify,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^main$ + - ^main- + cluster: build02 + context: ci/prow/verify-go + 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-microshift-main-verify-go + rerun_command: /test verify-go + 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=verify-go + 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( | .* )verify-go,?($|\s.*) From 8c8ca8b1961fbdccac94346edf9a2f4bd834496a Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Mon, 10 Apr 2023 16:22:43 -0500 Subject: [PATCH 2/4] make update --- .../openshift/microshift/openshift-microshift-main.yaml | 5 ++--- .../microshift/openshift-microshift-main-presubmits.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml index e95f9d9749d74..1eca30d0606af 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml @@ -119,11 +119,10 @@ tests: test: - as: verify-go-cache commands: make verify-go - from: src env: - - default: "/tmp/" + - default: /tmp/ name: GOLANGCI_LINT_CACHE - documentation: "" + from: src resources: requests: cpu: 100m diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml index f07b366eeaa79..63f36303265c8 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml @@ -1029,6 +1029,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=verify-go command: - ci-operator @@ -1039,6 +1040,9 @@ presubmits: requests: cpu: 10m volumeMounts: + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -1050,6 +1054,9 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: pull-secret secret: secretName: registry-pull-credentials From 541a326beda9dd0c9f829c033ecb1eeffd49a51c Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Mon, 10 Apr 2023 16:42:32 -0500 Subject: [PATCH 3/4] remove dupe verify --- .../openshift/microshift/openshift-microshift-main.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml index 1eca30d0606af..da5c2bc72543e 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml @@ -109,16 +109,11 @@ tag_specification: namespace: ocp tests: - as: verify - cluster: build02 - commands: make verify - container: - from: src -- as: verify-go cluster: build02 steps: test: - - as: verify-go-cache - commands: make verify-go + - as: verify + commands: make verify env: - default: /tmp/ name: GOLANGCI_LINT_CACHE From 0755badeb2b3c04007ef88ad2dabcb3ffb4d8abf Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Mon, 10 Apr 2023 16:44:20 -0500 Subject: [PATCH 4/4] make update --- .../openshift-microshift-main-presubmits.yaml | 54 +------------------ 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml index 63f36303265c8..88a541b366ad8 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml @@ -973,56 +973,6 @@ presubmits: pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-microshift-main-verify rerun_command: /test verify - 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=verify - 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( | .* )verify,?($|\s.*) - - agent: kubernetes - always_run: true - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/verify-go - 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-microshift-main-verify-go - rerun_command: /test verify-go spec: containers: - args: @@ -1030,7 +980,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=verify-go + - --target=verify command: - ci-operator image: ci-operator:latest @@ -1063,4 +1013,4 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )verify-go,?($|\s.*) + trigger: (?m)^/test( | .* )verify,?($|\s.*)