-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ROSAENG-1067: add gcp marketplace testing to rosa-e2e #79383
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
Merged
Merged
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
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
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
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
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
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
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,15 @@ | ||
| approvers: | ||
| - bmeng | ||
| - dustman9000 | ||
| - gdbranco | ||
| - jfrazierredhat | ||
| - ravitri | ||
| - tiwillia | ||
| options: {} | ||
| reviewers: | ||
| - bmeng | ||
| - dustman9000 | ||
| - gdbranco | ||
| - jfrazierredhat | ||
| - ravitri | ||
| - tiwillia |
15 changes: 15 additions & 0 deletions
15
ci-operator/step-registry/osd-ccs/gcp/wif-config/deprovision/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,15 @@ | ||
| approvers: | ||
| - bmeng | ||
| - dustman9000 | ||
| - gdbranco | ||
| - jfrazierredhat | ||
| - ravitri | ||
| - tiwillia | ||
| options: {} | ||
| reviewers: | ||
| - bmeng | ||
| - dustman9000 | ||
| - gdbranco | ||
| - jfrazierredhat | ||
| - ravitri | ||
| - tiwillia |
42 changes: 42 additions & 0 deletions
42
...egistry/osd-ccs/gcp/wif-config/deprovision/osd-ccs-gcp-wif-config-deprovision-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,42 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| function logger() { | ||
| local -r log_level=$1; shift | ||
| local -r log_msg=$1; shift | ||
| echo "$(date -u --rfc-3339=seconds) - ${log_level}: ${log_msg}" | ||
| } | ||
|
|
||
| trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM | ||
|
|
||
| GCP_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/osd-ccs-gcp.json" | ||
| export GOOGLE_APPLICATION_CREDENTIALS="${GCP_CREDENTIALS_FILE}" | ||
|
|
||
| # Log in | ||
| OCM_VERSION=$(ocm version) | ||
| OCM_TOKEN=$(cat "${CLUSTER_PROFILE_DIR}/ocm-token" 2>/dev/null || true) | ||
| SSO_CLIENT_ID=$(cat "${CLUSTER_PROFILE_DIR}/sso-client-id" 2>/dev/null || true) | ||
| SSO_CLIENT_SECRET=$(cat "${CLUSTER_PROFILE_DIR}/sso-client-secret" 2>/dev/null || true) | ||
| if [[ -n "${OCM_TOKEN}" ]]; then | ||
| logger "INFO" "Logging into ${OCM_LOGIN_ENV} with offline token using ocm cli ${OCM_VERSION}" | ||
| ocm login --url "${OCM_LOGIN_ENV}" --token "${OCM_TOKEN}" | ||
| elif [[ -n "${SSO_CLIENT_ID}" && -n "${SSO_CLIENT_SECRET}" ]]; then | ||
| logger "INFO" "Logging into ${OCM_LOGIN_ENV} with SSO credentials using ocm cli ${OCM_VERSION}" | ||
| ocm login --url "${OCM_LOGIN_ENV}" --client-id "${SSO_CLIENT_ID}" --client-secret "${SSO_CLIENT_SECRET}" | ||
| else | ||
| logger "ERROR" "Cannot login! You need to securely supply an ocm-token or SSO credentials!" | ||
| exit 1 | ||
| fi | ||
|
bmeng marked this conversation as resolved.
|
||
|
|
||
| WIF_CONFIG_ID=$(cat "${SHARED_DIR}/wif-config-id" 2>/dev/null || true) | ||
| if [[ -z "${WIF_CONFIG_ID}" ]]; then | ||
| logger "INFO" "No WIF config ID found in SHARED_DIR, skipping deletion" | ||
| exit 0 | ||
| fi | ||
|
|
||
| logger "INFO" "Deleting WIF config: ${WIF_CONFIG_ID}" | ||
| ocm gcp delete wif-config "${WIF_CONFIG_ID}" | ||
| logger "INFO" "WIF config ${WIF_CONFIG_ID} deleted successfully" | ||
21 changes: 21 additions & 0 deletions
21
...y/osd-ccs/gcp/wif-config/deprovision/osd-ccs-gcp-wif-config-deprovision-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,21 @@ | ||
| { | ||
| "path": "osd-ccs/gcp/wif-config/deprovision/osd-ccs-gcp-wif-config-deprovision-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "bmeng", | ||
| "dustman9000", | ||
| "gdbranco", | ||
| "jfrazierredhat", | ||
| "ravitri", | ||
| "tiwillia" | ||
| ], | ||
| "reviewers": [ | ||
| "bmeng", | ||
| "dustman9000", | ||
| "gdbranco", | ||
| "jfrazierredhat", | ||
| "ravitri", | ||
| "tiwillia" | ||
| ] | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
...p-registry/osd-ccs/gcp/wif-config/deprovision/osd-ccs-gcp-wif-config-deprovision-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,17 @@ | ||
| ref: | ||
| as: osd-ccs-gcp-wif-config-deprovision | ||
| from: ocm-cli | ||
| grace_period: 10m | ||
| commands: osd-ccs-gcp-wif-config-deprovision-commands.sh | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 300Mi | ||
| timeout: 30m | ||
| env: | ||
| - name: OCM_LOGIN_ENV | ||
| default: "staging" | ||
| documentation: The environment for ocm login. The supported values are [production, staging]. | ||
| documentation: |- | ||
| Deletes a GCP WIF (Workload Identity Federation) config using ocm cli. | ||
| Reads the WIF config ID from SHARED_DIR/wif-config-id. |
15 changes: 15 additions & 0 deletions
15
ci-operator/step-registry/osd-ccs/gcp/wif-config/provision/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,15 @@ | ||
| approvers: | ||
| - bmeng | ||
| - dustman9000 | ||
| - gdbranco | ||
| - jfrazierredhat | ||
| - ravitri | ||
| - tiwillia | ||
| options: {} | ||
| reviewers: | ||
| - bmeng | ||
| - dustman9000 | ||
| - gdbranco | ||
| - jfrazierredhat | ||
| - ravitri | ||
| - tiwillia |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.