From 698d63a057be42a5eaaa9d02d083c36358bf158e Mon Sep 17 00:00:00 2001 From: Praveen Jaya Kumar Date: Mon, 27 Jul 2026 17:53:01 +0530 Subject: [PATCH 1/2] OAPE-698: Integrate codecov in the must-gather-operator --- ...openshift-must-gather-operator-master.yaml | 132 ++++++++++++++++++ ...st-gather-operator-master-postsubmits.yaml | 88 ++++++++++++ ...ust-gather-operator-master-presubmits.yaml | 100 +++++++++++++ .../pipeline-controller/lgtm-config.yaml | 3 + 4 files changed, 323 insertions(+) diff --git a/ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml b/ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml index 86844e3659701..8da9cc1a042b1 100644 --- a/ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml +++ b/ci-operator/config/openshift/must-gather-operator/openshift-must-gather-operator-master.yaml @@ -7,6 +7,10 @@ base_images: name: cli-operator-sdk namespace: ocp tag: v1.39.2 + operator-sdk: + name: "4.19" + namespace: origin + tag: operator-sdk binary_build_commands: make go-build build_root: from_repository: true @@ -15,6 +19,8 @@ images: - dockerfile_path: Dockerfile.openshift from: base-rhel9 to: must-gather-operator + - dockerfile_path: images/ci/Dockerfile.coverage + to: must-gather-operator-coverage operator: bundles: - as: must-gather-operator-bundle @@ -164,6 +170,132 @@ tests: requests: cpu: 100m workflow: optional-operators-ci-operator-sdk-hypershift +- always_run: false + as: e2e-operator-coverage + cluster_claim: + architecture: amd64 + cloud: aws + owner: openshift-ci + product: ocp + timeout: 2h0m0s + version: "4.22" + steps: + post: + - as: collect-coverage + best_effort: true + cli: latest + commands: hack/e2e-coverage.sh collect + credentials: + - mount_path: /var/run/secrets/must-gather-operator/ci-secrets + name: must-gather-operator-codecov-token + namespace: test-credentials + from: src + resources: + requests: + cpu: 100m + timeout: 15m0s + - chain: gather + test: + - as: install + cli: latest + commands: | + oc create namespace must-gather-operator + operator-sdk run bundle --timeout=10m --security-context-config=restricted --install-mode=AllNamespaces -n must-gather-operator "$OO_BUNDLE" --verbose + oc wait --for condition=Available -n must-gather-operator deployment must-gather-operator + dependencies: + - env: OO_BUNDLE + name: must-gather-operator-bundle + from: operator-sdk + resources: + requests: + cpu: 100m + - as: setup-coverage + cli: latest + commands: hack/e2e-coverage.sh setup + dependencies: + - env: COVERAGE_IMAGE + name: must-gather-operator-coverage + from: src + resources: + requests: + cpu: 100m + - as: test + cli: latest + commands: | + export CASE_MANAGEMENT_CREDS_CONFIG_DIR=/var/run/secrets/must-gather-operator/case-management-creds + make test-e2e + credentials: + - mount_path: /var/run/secrets/must-gather-operator/case-management-creds + name: case-management-creds + namespace: test-credentials + from: src + resources: + requests: + cpu: 100m + workflow: generic-claim +- as: publish-e2e-coverage + cluster_claim: + architecture: amd64 + cloud: aws + owner: openshift-ci + product: ocp + timeout: 2h0m0s + version: "4.22" + postsubmit: true + steps: + post: + - as: collect-coverage + best_effort: true + cli: latest + commands: hack/e2e-coverage.sh collect + credentials: + - mount_path: /var/run/secrets/must-gather-operator/ci-secrets + name: must-gather-operator-codecov-token + namespace: test-credentials + from: src + resources: + requests: + cpu: 100m + timeout: 15m0s + - chain: gather + test: + - as: install + cli: latest + commands: | + oc create namespace must-gather-operator + operator-sdk run bundle --timeout=10m --security-context-config=restricted --install-mode=AllNamespaces -n must-gather-operator "$OO_BUNDLE" --verbose + oc wait --for condition=Available -n must-gather-operator deployment must-gather-operator + dependencies: + - env: OO_BUNDLE + name: must-gather-operator-bundle + from: operator-sdk + resources: + requests: + cpu: 100m + - as: setup-coverage + cli: latest + commands: hack/e2e-coverage.sh setup + dependencies: + - env: COVERAGE_IMAGE + name: must-gather-operator-coverage + from: src + resources: + requests: + cpu: 100m + - as: test + cli: latest + commands: | + export CASE_MANAGEMENT_CREDS_CONFIG_DIR=/var/run/secrets/must-gather-operator/case-management-creds + make test-e2e + credentials: + - mount_path: /var/run/secrets/must-gather-operator/case-management-creds + name: case-management-creds + namespace: test-credentials + from: src + resources: + requests: + cpu: 100m + workflow: generic-claim - always_run: false as: e2e-gcp-operator-rhcos10-fips optional: true diff --git a/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-postsubmits.yaml b/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-postsubmits.yaml index 80f2f7f460de3..cf1d2c20a1828 100644 --- a/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-postsubmits.yaml +++ b/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-postsubmits.yaml @@ -10,6 +10,7 @@ postsubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen @@ -72,6 +73,7 @@ postsubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen max_concurrency: 1 @@ -130,3 +132,89 @@ postsubmits: - name: result-aggregator secret: secretName: result-aggregator + - agent: kubernetes + always_run: true + branches: + - ^master$ + cluster: build03 + decorate: true + decoration_config: + sparse_checkout_files: + - .ci-operator.yaml + - Dockerfile.openshift + - images/ci/Dockerfile.coverage + labels: + ci.openshift.io/generator: prowgen + max_concurrency: 1 + name: branch-ci-openshift-must-gather-operator-master-publish-e2e-coverage + 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 + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=publish-e2e-coverage + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - 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: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + 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: hive-hive-credentials + secret: + secretName: hive-hive-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator diff --git a/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-presubmits.yaml b/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-presubmits.yaml index 2d19f2d903c9e..774849a726407 100644 --- a/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-presubmits.yaml @@ -12,6 +12,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -69,6 +70,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -141,6 +143,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci-operator.openshift.io/cloud: gcp ci-operator.openshift.io/cloud-cluster-profile: openshift-org-gcp @@ -225,6 +228,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci-operator.openshift.io/cloud: gcp ci-operator.openshift.io/cloud-cluster-profile: openshift-org-gcp @@ -310,6 +314,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci-operator.openshift.io/cloud: gcp ci-operator.openshift.io/cloud-cluster-profile: openshift-org-gcp @@ -383,6 +388,96 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-gcp-operator-rhcos10-fips,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^master$ + - ^master- + cluster: build12 + context: ci/prow/e2e-operator-coverage + decorate: true + decoration_config: + sparse_checkout_files: + - .ci-operator.yaml + - Dockerfile.openshift + - images/ci/Dockerfile.coverage + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-must-gather-operator-master-e2e-operator-coverage + rerun_command: /test e2e-operator-coverage + 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 + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-operator-coverage + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - 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: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + 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: hive-hive-credentials + secret: + secretName: hive-hive-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )(e2e-operator-coverage|remaining-required),?($|\s.*) - agent: kubernetes always_run: true branches: @@ -395,6 +490,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -453,6 +549,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -639,6 +736,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -704,6 +802,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -770,6 +869,7 @@ presubmits: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" diff --git a/core-services/pipeline-controller/lgtm-config.yaml b/core-services/pipeline-controller/lgtm-config.yaml index fb7d44529b007..74c3172f4113a 100644 --- a/core-services/pipeline-controller/lgtm-config.yaml +++ b/core-services/pipeline-controller/lgtm-config.yaml @@ -165,6 +165,9 @@ orgs: branches: - main - hypershift + - name: must-gather-operator + branches: + - master - name: zero-trust-workload-identity-manager branches: - main From 65e01bb83ecc591291600adb33c56e3439167f2d Mon Sep 17 00:00:00 2001 From: Praveen Jaya Kumar Date: Thu, 13 Aug 2026 12:01:26 +0530 Subject: [PATCH 2/2] OAPE-698: regenerate must-gather-operator master periodics Include images/ci/Dockerfile.coverage in sparse_checkout_files after make jobs. Co-authored-by: Cursor --- .../openshift-must-gather-operator-master-periodics.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-periodics.yaml b/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-periodics.yaml index 6c34ac39eb2b3..ca40b5bf9db75 100644 --- a/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-periodics.yaml +++ b/ci-operator/jobs/openshift/must-gather-operator/openshift-must-gather-operator-master-periodics.yaml @@ -7,6 +7,7 @@ periodics: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage extra_refs: - base_ref: master org: openshift @@ -14,6 +15,7 @@ periodics: sparse_checkout_files: - .ci-operator.yaml - Dockerfile.openshift + - images/ci/Dockerfile.coverage labels: ci-operator.openshift.io/cloud: aws ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws