Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions ci-operator/config/openshift/hive/openshift-hive-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ images:
dockerfile_path: Dockerfile
from: ubi9-minimal-entitled
to: hive
- dockerfile_path: Dockerfile.ote
to: hive-tests
skip_if_only_changed: ^(?:docs|\.tekton)/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
promotion:
to:
Expand Down Expand Up @@ -289,6 +291,146 @@ 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-pool-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: |
/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: |
/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-azure
- 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: |
/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
Comment on lines +412 to +433
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

vSphere OTE test is missing required environment variable setup.

The original e2e-vsphere test (lines 227-263) sources multiple configuration files and exports several environment variables critical for vSphere operation:

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)

The OTE version doesn't perform any of this setup. Unless the OTE framework handles this internally or obtains these values through different means, the vSphere tests will likely fail due to missing configuration.

Proposed fix to add required vSphere configuration
 - 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: |
+        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:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci-operator/config/openshift/hive/openshift-hive-master.yaml` around lines
412 - 433, The e2e-vsphere-ote job is missing the vSphere environment setup;
update the job (as: e2e-vsphere-ote) to source the same shared scripts and
export the same env vars as the original e2e-vsphere job before running tests:
source $SHARED_DIR/vsphere_context.sh, $SHARED_DIR/govc.sh and
$SHARED_DIR/additional_cluster.sh, then export
CLUSTER_NAME=$ADDITIONAL_CLUSTER_NAME,
VSPHERE_API_VIP=$ADDITIONAL_CLUSTER_API_VIP,
VSPHERE_INGRESS_VIP=$ADDITIONAL_CLUSTER_INGRESS_VIP,
VSPHERE_MACHINE_NETWORK=$(<"${SHARED_DIR}/machinecidr.txt"),
BASE_DOMAIN=$(<"${SHARED_DIR}/basedomain.txt") and
VSPHERE_INSTALLER_PLATFORM_SPEC_JSON=$(<"${SHARED_DIR}/platform.json") (place
these commands at the start of the test.commands block that runs
/usr/bin/openshift-tests-extension run-suite openshift/hive so the hive tests
receive the required vSphere configuration).

zz_generated_metadata:
branch: master
org: openshift
Expand Down
Loading