-
Notifications
You must be signed in to change notification settings - Fork 2.2k
openstack-test: migrate CI config to OTE (openshift-tests-extension) #79487
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
Open
mandre
wants to merge
1
commit into
openshift:main
Choose a base branch
from
shiftstack:openstack-test-ote
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
ci-operator/step-registry/openstack/test/openstack-ote/OWNERS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - openstack-approvers | ||
| reviewers: | ||
| - openstack-reviewers |
56 changes: 56 additions & 0 deletions
56
...rator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-commands.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
11 changes: 11 additions & 0 deletions
11
...step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-ref.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| ] | ||
| } | ||
| } |
33 changes: 33 additions & 0 deletions
33
ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-ref.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Regenerate CI artifacts after this ci-operator config change.
This file has structural CI test-step wiring changes, so please run
make updateand include downstream generated updates if any.As per coding guidelines, "After modifying CI configuration files in
ci-operator/config/, regenerate downstream artifacts by runningmake update".Also applies to: 44-45, 64-65, 71-74, 82-85
🤖 Prompt for AI Agents