From 1dd60cfdbcc3514a4d1a211dd5162b28b6cf4dd1 Mon Sep 17 00:00:00 2001 From: miyadav Date: Wed, 29 Apr 2026 12:02:41 +0100 Subject: [PATCH] add OTE e2e test jobs for openshift/hive Add e2e-ote, e2e-gcp-ote, e2e-azure-ote, and e2e-vsphere-ote test jobs using the OpenShift Tests Extension framework. Temporarily uses dockerfile_literal to build hive-tests from miyadav/hive:fix-ote-init branch while the hive PR is validated. Co-Authored-By: Claude Opus 4.6 --- .../openshift/hive/openshift-hive-master.yaml | 129 ++++++ .../hive/openshift-hive-master-periodics.yaml | 30 +- .../openshift-hive-master-postsubmits.yaml | 6 +- .../openshift-hive-master-presubmits.yaml | 382 +++++++++++++++++- 4 files changed, 527 insertions(+), 20 deletions(-) diff --git a/ci-operator/config/openshift/hive/openshift-hive-master.yaml b/ci-operator/config/openshift/hive/openshift-hive-master.yaml index 74e5e1b3d2cae..8b776d41145fb 100644 --- a/ci-operator/config/openshift/hive/openshift-hive-master.yaml +++ b/ci-operator/config/openshift/hive/openshift-hive-master.yaml @@ -26,6 +26,18 @@ images: dockerfile_path: Dockerfile from: ubi9-minimal-entitled to: hive + - dockerfile_literal: | + FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 as builder + RUN mkdir -p /go/src/github.com/openshift/hive + WORKDIR /go/src/github.com/openshift/hive + RUN git clone --branch fix-ote-init --depth 1 https://github.com/miyadav/hive.git . + RUN make -C test/ote build + FROM registry.access.redhat.com/ubi9/ubi-minimal:latest + RUN microdnf install -y gzip jq && microdnf clean all + COPY --from=builder /go/src/github.com/openshift/hive/test/ote/bin/hive /usr/bin/openshift-tests-extension + RUN gzip -f -k /usr/bin/openshift-tests-extension + WORKDIR /tmp + to: hive-tests skip_if_only_changed: ^(?:docs|\.tekton)/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ promotion: to: @@ -291,6 +303,123 @@ tests: requests: cpu: 100m workflow: ipi-openstack +- as: e2e-ote + cluster_claim: + architecture: amd64 + as: unused + cloud: aws + labels: + region: us-east-1 + owner: openshift-ci + product: ocp + timeout: 1h0m0s + version: "4.20" + skip_if_only_changed: ^(?:docs|\.tekton)/|\.md$|^(?:.*/)?(?:\.gitignore|.coderabbit.yaml|OWNERS|PROJECT|LICENSE)$ + steps: + test: + - as: test + cli: latest + commands: | + export AWS_ACCESS_KEY_ID=$(cat /tmp/secret/hiveci-aws-creds/AWS_ACCESS_KEY_ID) + export AWS_SECRET_ACCESS_KEY=$(cat /tmp/secret/hiveci-aws-creds/AWS_SECRET_ACCESS_KEY) + export PULL_SECRET_FILE=/tmp/secret/pull-secret/.dockerconfigjson + export CLUSTER_NAME=$(printf "hiveci-%x-%x" $(date +%s) $PULL_NUMBER) + /usr/bin/openshift-tests-extension run-suite openshift/hive + credentials: + - mount_path: /tmp/secret/hiveci-aws-creds + name: hiveci-aws-creds + namespace: test-credentials + - mount_path: /tmp/secret/pull-secret + name: ci-pull-credentials + namespace: test-credentials + dependencies: + - env: HIVE_IMAGE + name: hive + - env: RELEASE_IMAGE + name: release:latest + from: hive-tests + grace_period: 15m0s + resources: + requests: + cpu: 100m + workflow: generic-claim +- as: e2e-gcp-ote + run_if_changed: gcp + steps: + cluster_profile: openshift-org-gcp + test: + - as: test + cli: latest + commands: | + export KUBECONFIG="${SHARED_DIR}/kubeconfig" + /usr/bin/openshift-tests-extension run-suite openshift/hive + dependencies: + - env: HIVE_IMAGE + name: hive + - env: RELEASE_IMAGE + name: release:latest + from: hive-tests + resources: + requests: + cpu: 100m + workflow: ipi-gcp +- as: e2e-azure-ote + run_if_changed: azure + steps: + cluster_profile: openshift-org-azure + test: + - as: test + cli: latest + commands: | + export KUBECONFIG="${SHARED_DIR}/kubeconfig" + export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt) + /usr/bin/openshift-tests-extension run-suite openshift/hive + dependencies: + - env: HIVE_IMAGE + name: hive + - env: RELEASE_IMAGE + name: release:latest + from: hive-tests + resources: + requests: + cpu: 100m + timeout: 2h30m0s + workflow: ipi-azure + timeout: 4h30m0s +- as: e2e-vsphere-ote + run_if_changed: vsphere + steps: + cluster_profile: vsphere-elastic + env: + NETWORK_TYPE: single-tenant + VSPHERE_ADDITIONAL_CLUSTER: "true" + test: + - as: test + cli: latest + commands: | + export KUBECONFIG="${SHARED_DIR}/kubeconfig" + source $SHARED_DIR/vsphere_context.sh + source $SHARED_DIR/govc.sh + source $SHARED_DIR/additional_cluster.sh + + export CLUSTER_NAME=$ADDITIONAL_CLUSTER_NAME + export VSPHERE_API_VIP=$ADDITIONAL_CLUSTER_API_VIP + export VSPHERE_INGRESS_VIP=$ADDITIONAL_CLUSTER_INGRESS_VIP + export VSPHERE_MACHINE_NETWORK=$(<"${SHARED_DIR}"/machinecidr.txt) + export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt) + export VSPHERE_INSTALLER_PLATFORM_SPEC_JSON=$(<"${SHARED_DIR}"/platform.json) + + /usr/bin/openshift-tests-extension run-suite openshift/hive + dependencies: + - env: HIVE_IMAGE + name: hive + - env: RELEASE_IMAGE + name: release:latest + from: hive-tests + resources: + requests: + cpu: 100m + workflow: ipi-vsphere zz_generated_metadata: branch: master org: openshift diff --git a/ci-operator/jobs/openshift/hive/openshift-hive-master-periodics.yaml b/ci-operator/jobs/openshift/hive/openshift-hive-master-periodics.yaml index fce63a4db366c..7eb3cafd6891c 100644 --- a/ci-operator/jobs/openshift/hive/openshift-hive-master-periodics.yaml +++ b/ci-operator/jobs/openshift/hive/openshift-hive-master-periodics.yaml @@ -4,11 +4,14 @@ periodics: cron: 5 4 * * 4 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile extra_refs: - base_ref: master org: openshift repo: hive + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/cloud: azure4 ci-operator.openshift.io/cloud-cluster-profile: openshift-org-azure @@ -96,11 +99,14 @@ periodics: cron: 5 4 * * 3 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile extra_refs: - base_ref: master org: openshift repo: hive + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/cloud: gcp ci-operator.openshift.io/cloud-cluster-profile: openshift-org-gcp @@ -188,11 +194,14 @@ periodics: cron: 10 23 * * 0 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile extra_refs: - base_ref: master org: openshift repo: hive + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/cloud: openstack-vexxhost ci-operator.openshift.io/cloud-cluster-profile: openstack-vexxhost @@ -281,11 +290,14 @@ periodics: cron: 5 4 * * 2 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile extra_refs: - base_ref: master org: openshift repo: hive + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/variant: periodic ci.openshift.io/generator: prowgen @@ -378,11 +390,14 @@ periodics: cron: 5 4 * * 5 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile extra_refs: - base_ref: master org: openshift repo: hive + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/cloud: vsphere ci-operator.openshift.io/cloud-cluster-profile: vsphere-elastic @@ -471,11 +486,14 @@ periodics: cron: 5 4 * * 1 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile extra_refs: - base_ref: master org: openshift repo: hive + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/variant: periodic ci.openshift.io/generator: prowgen diff --git a/ci-operator/jobs/openshift/hive/openshift-hive-master-postsubmits.yaml b/ci-operator/jobs/openshift/hive/openshift-hive-master-postsubmits.yaml index f9f957b921096..c7cc484968df7 100644 --- a/ci-operator/jobs/openshift/hive/openshift-hive-master-postsubmits.yaml +++ b/ci-operator/jobs/openshift/hive/openshift-hive-master-postsubmits.yaml @@ -7,7 +7,8 @@ postsubmits: cluster: build04 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen @@ -68,7 +69,8 @@ postsubmits: cluster: build04 decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20" diff --git a/ci-operator/jobs/openshift/hive/openshift-hive-master-presubmits.yaml b/ci-operator/jobs/openshift/hive/openshift-hive-master-presubmits.yaml index bcc78cde81651..3cf8fe874ca7a 100644 --- a/ci-operator/jobs/openshift/hive/openshift-hive-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/hive/openshift-hive-master-presubmits.yaml @@ -9,7 +9,8 @@ presubmits: context: ci/prow/coverage decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20" @@ -81,7 +82,8 @@ presubmits: context: ci/prow/e2e decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20" @@ -170,7 +172,8 @@ presubmits: context: ci/prow/e2e-azure decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile timeout: 4h30m0s labels: ci-operator.openshift.io/cloud: azure4 @@ -246,6 +249,92 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-azure,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^master$ + - ^master- + cluster: build08 + context: ci/prow/e2e-azure-ote + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + timeout: 4h30m0s + labels: + ci-operator.openshift.io/cloud: azure4 + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-azure + ci.openshift.io/generator: prowgen + job-release: "4.20" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-hive-master-e2e-azure-ote + rerun_command: /test e2e-azure-ote + run_if_changed: azure + 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=e2e-azure-ote + 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/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: 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-azure-ote,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -255,7 +344,8 @@ presubmits: context: ci/prow/e2e-gcp decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/cloud: gcp ci-operator.openshift.io/cloud-cluster-profile: openshift-org-gcp @@ -330,6 +420,91 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-gcp,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^master$ + - ^master- + cluster: build08 + context: ci/prow/e2e-gcp-ote + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: gcp + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-gcp + ci.openshift.io/generator: prowgen + job-release: "4.20" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-hive-master-e2e-gcp-ote + rerun_command: /test e2e-gcp-ote + run_if_changed: gcp + 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=e2e-gcp-ote + 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/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: 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-gcp-ote,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -339,7 +514,8 @@ presubmits: context: ci/prow/e2e-openstack decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/cloud: openstack-vexxhost ci-operator.openshift.io/cloud-cluster-profile: openstack-vexxhost @@ -414,6 +590,96 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-openstack,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^master$ + - ^master- + cluster: build08 + context: ci/prow/e2e-ote + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci.openshift.io/generator: prowgen + job-release: "4.20" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-hive-master-e2e-ote + rerun_command: /test e2e-ote + skip_if_only_changed: ^(?:docs|\.tekton)/|\.md$|^(?:.*/)?(?:\.gitignore|.coderabbit.yaml|OWNERS|PROJECT|LICENSE)$ + 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-ote + 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-ote,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -423,7 +689,8 @@ presubmits: context: ci/prow/e2e-pool decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20" @@ -512,7 +779,8 @@ presubmits: context: ci/prow/e2e-vsphere decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/cloud: vsphere ci-operator.openshift.io/cloud-cluster-profile: vsphere-elastic @@ -587,6 +855,91 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-vsphere,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^master$ + - ^master- + cluster: vsphere02 + context: ci/prow/e2e-vsphere-ote + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: vsphere + ci-operator.openshift.io/cloud-cluster-profile: vsphere-elastic + ci.openshift.io/generator: prowgen + job-release: "4.20" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-hive-master-e2e-vsphere-ote + rerun_command: /test e2e-vsphere-ote + run_if_changed: vsphere + 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=e2e-vsphere-ote + 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/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: 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-vsphere-ote,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -596,7 +949,8 @@ presubmits: context: ci/prow/images decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20" @@ -653,7 +1007,8 @@ presubmits: context: ci/prow/periodic-images decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci-operator.openshift.io/variant: periodic ci.openshift.io/generator: prowgen @@ -712,7 +1067,8 @@ presubmits: context: ci/prow/security decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20" @@ -794,7 +1150,8 @@ presubmits: context: ci/prow/unit decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20" @@ -859,7 +1216,8 @@ presubmits: context: ci/prow/verify decorate: true decoration_config: - skip_cloning: true + sparse_checkout_files: + - Dockerfile labels: ci.openshift.io/generator: prowgen job-release: "4.20"