-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add CI job for checking E2E coverage on ZTWIM operator #78969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c43cfd8
18a766e
c07a55b
4755a54
00196ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,8 @@ images: | |
| items: | ||
| - dockerfile_path: Dockerfile | ||
| to: zero-trust-workload-identity-manager | ||
| - dockerfile_path: Dockerfile.coverage | ||
| to: zero-trust-workload-identity-manager-coverage | ||
| operator: | ||
| bundles: | ||
| - as: zero-trust-workload-identity-manager-bundle | ||
|
|
@@ -145,6 +147,120 @@ tests: | |
| requests: | ||
| cpu: 100m | ||
| workflow: optional-operators-ci-operator-sdk-aws | ||
| - always_run: false | ||
| as: operator-e2e-coverage | ||
| cluster_claim: | ||
| architecture: amd64 | ||
| cloud: aws | ||
| owner: openshift-ci | ||
| product: ocp | ||
| timeout: 2h0m0s | ||
| version: "4.20" | ||
| steps: | ||
| post: | ||
| - as: collect-coverage | ||
| best_effort: true | ||
| cli: latest | ||
| commands: hack/e2e-coverage.sh collect | ||
| credentials: | ||
| - mount_path: /var/run/secrets/codecov | ||
| name: ztwim-codecov-token | ||
| namespace: test-credentials | ||
| from: src | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| timeout: 15m0s | ||
| - chain: gather | ||
| test: | ||
| - as: install | ||
| cli: latest | ||
| commands: | | ||
| oc create namespace zero-trust-workload-identity-manager | ||
| operator-sdk run bundle --timeout=10m --security-context-config=restricted --install-mode=AllNamespaces -n zero-trust-workload-identity-manager "$OO_BUNDLE" --verbose | ||
| oc wait --for condition=Available -n zero-trust-workload-identity-manager deployment zero-trust-workload-identity-manager-controller-manager | ||
| dependencies: | ||
| - env: OO_BUNDLE | ||
| name: zero-trust-workload-identity-manager-bundle | ||
| from: operator-sdk | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| - as: setup-coverage | ||
| cli: latest | ||
| commands: hack/e2e-coverage.sh setup | ||
| dependencies: | ||
| - env: COVERAGE_IMAGE | ||
| name: zero-trust-workload-identity-manager-coverage | ||
| from: src | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| - as: test | ||
| cli: latest | ||
| commands: make test-e2e | ||
| 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.20" | ||
| postsubmit: true | ||
| steps: | ||
| post: | ||
| - as: collect-coverage | ||
| best_effort: true | ||
| cli: latest | ||
| commands: hack/e2e-coverage.sh collect | ||
| credentials: | ||
| - mount_path: /var/run/secrets/codecov | ||
| name: ztwim-codecov-token | ||
| namespace: test-credentials | ||
| from: src | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| timeout: 15m0s | ||
|
Comment on lines
+218
to
+230
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fail the postsubmit when baseline publication breaks. In Suggested change post:
- as: collect-coverage
- best_effort: true
cli: latest
commands: hack/e2e-coverage.sh collect🤖 Prompt for AI Agents |
||
| - chain: gather | ||
| test: | ||
| - as: install | ||
| cli: latest | ||
| commands: | | ||
| oc create namespace zero-trust-workload-identity-manager | ||
| operator-sdk run bundle --timeout=10m --security-context-config=restricted --install-mode=AllNamespaces -n zero-trust-workload-identity-manager "$OO_BUNDLE" --verbose | ||
| oc wait --for condition=Available -n zero-trust-workload-identity-manager deployment zero-trust-workload-identity-manager-controller-manager | ||
| dependencies: | ||
| - env: OO_BUNDLE | ||
| name: zero-trust-workload-identity-manager-bundle | ||
| from: operator-sdk | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| - as: setup-coverage | ||
| cli: latest | ||
| commands: hack/e2e-coverage.sh setup | ||
| dependencies: | ||
| - env: COVERAGE_IMAGE | ||
| name: zero-trust-workload-identity-manager-coverage | ||
| from: src | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| - as: test | ||
| cli: latest | ||
| commands: make test-e2e | ||
| from: src | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| workflow: generic-claim | ||
| zz_generated_metadata: | ||
| branch: main | ||
| org: openshift | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| postsubmits: | ||
| openshift/zero-trust-workload-identity-manager: | ||
| - agent: kubernetes | ||
| always_run: true | ||
| branches: | ||
| - ^main$ | ||
| cluster: build01 | ||
| decorate: true | ||
| decoration_config: | ||
| sparse_checkout_files: | ||
| - .ci-operator.yaml | ||
| - Dockerfile | ||
| - Dockerfile.coverage | ||
| labels: | ||
| ci.openshift.io/generator: prowgen | ||
| max_concurrency: 1 | ||
| name: branch-ci-openshift-zero-trust-workload-identity-manager-main-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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep coverage setup out of the required
e2e-operatorsignal.setup-coverageis now a mandatory step inside the existing presubmit. Ifhack/e2e-coverage.sh setupor the coverage image regresses, the functional E2E lane starts failing for coverage/tooling reasons rather than operator behavior. Given the stated goal here was an optional coverage presubmit, this should stay decoupled from the requirede2e-operatorpath.🤖 Prompt for AI Agents