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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
binary_build_commands: go build -o /bin/openstack-tests ./cmd/openshift-tests
binary_build_commands: make tests-ext-build && cp bin/openstack-test-tests-ext /usr/bin/
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 | 🟡 Minor | ⚡ Quick win

Regenerate CI artifacts after this ci-operator config change.

This file has structural CI test-step wiring changes, so please run make update and include downstream generated updates if any.

As per coding guidelines, "After modifying CI configuration files in ci-operator/config/, regenerate downstream artifacts by running make update".

Also applies to: 44-45, 64-65, 71-74, 82-85

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/config/openshift/openstack-test/openshift-openstack-test-main.yaml`
at line 1, The ci-operator config change modified the binary_build_commands
entry (the line containing "binary_build_commands: make tests-ext-build && cp
bin/openstack-test-tests-ext /usr/bin/") and requires regenerating downstream CI
artifacts; run make update at the repo root, review and add the generated
changes (including updates for the other affected sections referenced: lines
around 44-45, 64-65, 71-74, 82-85), verify the generated files pass CI, and
commit the regenerated artifacts alongside this config change.

build_root:
from_repository: true
use_build_cache: true
Expand Down Expand Up @@ -28,7 +28,7 @@ resources:
memory: 200Mi
tests:
- as: build
commands: openstack-tests --help
commands: ./bin/openstack-test-tests-ext --help
container:
from: bin
- as: verify
Expand All @@ -41,7 +41,7 @@ tests:
env:
CONFIG_TYPE: minimal
test:
- ref: openstack-test-openstack
- ref: openstack-test-openstack-ote
workflow: openshift-e2e-openstack-ipi
- always_run: false
as: e2e-openstack-ccpmso
Expand All @@ -61,13 +61,16 @@ tests:
requests:
cpu: 100m
timeout: 7h0m0s
- ref: openstack-test-openstack
- ref: openstack-test-openstack-ote
workflow: openshift-e2e-openstack-ipi
- always_run: false
as: e2e-openstack-dualstack
optional: true
steps:
cluster_profile: openstack-hwoffload
test:
- ref: openshift-e2e-test
- ref: openstack-test-openstack-ote
workflow: openshift-e2e-openstack-dualstack
- always_run: false
as: e2e-openstack-dualstack-v6primary
Expand All @@ -76,6 +79,9 @@ tests:
cluster_profile: openstack-hwoffload
env:
CONFIG_TYPE: dualstack-v6primary
test:
- ref: openshift-e2e-test
- ref: openstack-test-openstack-ote
workflow: openshift-e2e-openstack-dualstack
zz_generated_metadata:
branch: main
Expand Down
4 changes: 4 additions & 0 deletions ci-operator/step-registry/openstack/test/openstack-ote/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
approvers:
- openstack-approvers
reviewers:
- openstack-reviewers
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash

set -Eeuo pipefail

export OS_CLIENT_CONFIG_FILE="${SHARED_DIR}/clouds.yaml"
export PATH=/usr/libexec/origin:$PATH

declare TEST_ARGS=''

# Force the IPv6 endpoint
if [[ "${CONFIG_TYPE}" == *"singlestackv6"* ]]; then
export OS_CLOUD="${OS_CLOUD}-ipv6"
fi

# For disconnected or otherwise unreachable environments, we want to
# have steps use an HTTP(S) proxy to reach the API server. This proxy
# configuration file should export HTTP_PROXY, HTTPS_PROXY, and NO_PROXY
# environment variables, as well as their lowercase equivalents (note
# that libcurl doesn't recognize the uppercase variables).
if test -f "${SHARED_DIR}/proxy-conf.sh"
then
# shellcheck disable=SC1090
source "${SHARED_DIR}/proxy-conf.sh"
fi

# Set up the test provider for OpenStack
if test -n "${HTTP_PROXY:-}" -o -n "${HTTPS_PROXY:-}"; then
export TEST_PROVIDER='{"type":"openstack","disconnected":true}'
else
export TEST_PROVIDER='{"type":"openstack"}'
fi

# In order for openshift-tests to pull external binary images from the
# payload, we need access enabled to the images on the build farm. In
# order to do that, we need to unset the KUBECONFIG so we talk to the
# build farm, not the cluster under test.
echo "Granting access for image pulling from the build farm..."
KUBECONFIG_BAK=$KUBECONFIG
unset KUBECONFIG
oc adm policy add-role-to-group system:image-puller system:unauthenticated --namespace "${NAMESPACE}" || echo "Warning: Failed to grant image puller access, continuing..."
export KUBECONFIG=$KUBECONFIG_BAK

TEST_SUITE="openstack-test/all"

if [[ -n "${OPENSTACK_TEST_SKIPS}" ]]; then
TESTS="$(openshift-tests run --dry-run --provider "${TEST_PROVIDER}" "${TEST_SUITE}")"
echo "${TESTS}" | grep -v "${OPENSTACK_TEST_SKIPS}" >/tmp/tests
echo "Skipping tests:"
echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; exit $exit_code; }
TEST_ARGS="${TEST_ARGS:-} --file /tmp/tests"
fi

openshift-tests run "${TEST_SUITE}" ${TEST_ARGS:-} \
--provider "${TEST_PROVIDER}" \
--junit-dir "${ARTIFACT_DIR}/junit" \
-o "${ARTIFACT_DIR}/e2e.log"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "openstack/test/openstack-ote/openstack-test-openstack-ote-ref.yaml",
"owners": {
"approvers": [
"openstack-approvers"
],
"reviewers": [
"openstack-reviewers"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ref:
as: openstack-test-openstack-ote
from: tests
cli: latest
commands: openstack-test-openstack-ote-commands.sh
resources:
requests:
cpu: "3"
memory: 600Mi
limits:
memory: 10Gi
env:
- name: OS_CLOUD
default: "openstack"
documentation: Name of cloud to use from ${SHARED_DIR}/clouds.yaml file
- name: OPENSTACK_TEST_SKIPS
default: ""
documentation: |
Regular expression (POSIX basic regular expression) of tests to skip.
It is suggested to test the regex to make sure that it matches with the available tests.
Tests can be listed by using 'openshift-tests run --dry-run (...)'. Sometimes, the tests
that are printed in Prow won't exactly match the list returned by openshift-tests.
- name: CONFIG_TYPE
default: ''
documentation: |
The type of config for the environment to deploy.

* 'dualstack' - Configure the install-config to enable dualstack clusters.
* 'singlestackv6' - Configure the install-config to enable single-stack v6 clusters.
documentation: |-
Runs the OpenShift OpenStack-specific tests using the OTE (OpenShift Tests Extension)
framework. Tests are discovered and run through openshift-tests which loads the
openstack-test extension from the release payload.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [[ -n "${OPENSTACK_TEST_SKIPS}" ]]; then
TESTS="$(openstack-tests run --dry-run openshift/openstack)"
echo "${TESTS}" | grep -v "${OPENSTACK_TEST_SKIPS}" >/tmp/tests
echo "Skipping tests:"
echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; return $exit_code; }
echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; exit $exit_code; }
TEST_ARGS="${TEST_ARGS:-} --file /tmp/tests"
fi

Expand Down