-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add presubmit jobs on pull request checking for rosacli (#51427)
update update update update update update update update update
- Loading branch information
Showing
6 changed files
with
300 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
ci-operator/config/openshift/rosa/openshift-rosa-master__e2e-presubmits.yaml
This file contains 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,58 @@ | ||
base_images: | ||
cli-ocm: | ||
name: cli-ocm | ||
namespace: ci | ||
tag: latest | ||
ocp_builder_rhel-8-golang-1.21-openshift-4.16: | ||
name: builder | ||
namespace: ocp | ||
tag: rhel-8-golang-1.21-openshift-4.16 | ||
origin_4.16_cli: | ||
name: "4.16" | ||
namespace: origin | ||
tag: cli | ||
build_root: | ||
image_stream_tag: | ||
name: builder | ||
namespace: ocp | ||
tag: rhel-8-golang-1.21-openshift-4.16 | ||
images: | ||
- dockerfile_path: images/Dockerfile.e2e | ||
from: origin_4.16_cli | ||
inputs: | ||
cli-ocm: | ||
as: | ||
- registry.ci.openshift.org/ci/cli-ocm:latest | ||
ocp_builder_rhel-8-golang-1.21-openshift-4.16: | ||
as: | ||
- registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 | ||
to: rosa-aws-cli | ||
releases: | ||
latest: | ||
integration: | ||
name: "4.16" | ||
namespace: ocp | ||
resources: | ||
'*': | ||
requests: | ||
cpu: 150m | ||
memory: 300Mi | ||
tests: | ||
- always_run: false | ||
as: pr-rosa-hcp | ||
optional: true | ||
steps: | ||
cluster_profile: aws-sd-qe | ||
env: | ||
ENABLE_AUTOSCALING: "true" | ||
MAX_REPLICAS: "6" | ||
MIN_REPLICAS: "3" | ||
TEST_LABEL_FILTERS: (day1-post,day2)&&!NonHCPCluster&&!Exclude | ||
test: | ||
- ref: rosa-test-e2e-pull-request | ||
workflow: rosa-aws-sts-hcp-byo-kms-oidc-auditlog | ||
zz_generated_metadata: | ||
branch: master | ||
org: openshift | ||
repo: rosa | ||
variant: e2e-presubmits |
This file contains 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 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 @@ | ||
../OWNERS |
54 changes: 54 additions & 0 deletions
54
ci-operator/step-registry/rosa/test/e2e/pull-request/rosa-test-e2e-pull-request-commands.sh
This file contains 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,54 @@ | ||
#!/bin/bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
|
||
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM | ||
|
||
log(){ | ||
echo -e "\033[1m$(date "+%d-%m-%YT%H:%M:%S") " "${*}" | ||
} | ||
|
||
TEST_LABEL_FILTERS=${TEST_LABEL_FILTERS:-} | ||
CLUSTER_ID=$(cat "${SHARED_DIR}/cluster-id") | ||
log "Working on the cluster: $CLUSTER_ID" | ||
export CLUSTER_ID # maybe we should get cluster_id by TEST_PROFILE | ||
|
||
|
||
# Configure aws | ||
REGION=${REGION:-${LEASED_RESOURCE}} | ||
AWSCRED="${CLUSTER_PROFILE_DIR}/.awscred" | ||
export AWS_SHARED_CREDENTIALS_FILE="${AWSCRED}" | ||
export AWS_DEFAULT_REGION="${REGION}" | ||
|
||
# Log in | ||
OCM_TOKEN=$(cat "${CLUSTER_PROFILE_DIR}/ocm-token") | ||
rosa login --env "${OCM_LOGIN_ENV}" --token "${OCM_TOKEN}" | ||
|
||
# Variables | ||
COMMIT_FOCUS="/rosa/tests/ci/data/commit-focus" | ||
FOCUS=$(cat "${COMMIT_FOCUS}") | ||
FOCUS_LABEL_FILTER="" | ||
FOCUS_SWITCH="--ginkgo.focus ${FOCUS}" | ||
if [[ -z "$FOCUS" ]]; then | ||
echo "Warning: No TC updated, focus on Critial" | ||
FOCUS_LABEL_FILTER="Critical" | ||
FOCUS_SWITCH="" | ||
fi | ||
|
||
LABEL_FILTER_SWITCH="" | ||
if [[ ! -z "$FOCUS_LABEL_FILTER" ]]; then | ||
if [[ -z "$TEST_LABEL_FILTERS" ]]; then | ||
TEST_LABEL_FILTERS=${FOCUS_LABEL_FILTER} | ||
else | ||
TEST_LABEL_FILTERS="${TEST_LABEL_FILTERS}&&$FOCUS_LABEL_FILTER" | ||
fi | ||
fi | ||
if [[ ! -z "$TEST_LABEL_FILTERS" ]]; then | ||
echo "Label Filter: $TEST_LABEL_FILTERS" | ||
LABEL_FILTER_SWITCH="--ginkgo.label-filter ${TEST_LABEL_FILTERS}" | ||
fi | ||
|
||
log "INFO: Start pull reqeust testing ..." | ||
rosatest --ginkgo.v --ginkgo.no-color ${FOCUS_SWITCH} ${LABEL_FILTER_SWITCH} |
25 changes: 25 additions & 0 deletions
25
...tor/step-registry/rosa/test/e2e/pull-request/rosa-test-e2e-pull-request-ref.metadata.json
This file contains 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,25 @@ | ||
{ | ||
"path": "rosa/test/e2e/pull-request/rosa-test-e2e-pull-request-ref.yaml", | ||
"owners": { | ||
"approvers": [ | ||
"yasun1", | ||
"xueli181114", | ||
"yuwang-RH", | ||
"yufchang", | ||
"jtaleric", | ||
"svetsa-rh", | ||
"radtriste" | ||
], | ||
"reviewers": [ | ||
"yasun1", | ||
"xueli181114", | ||
"yuwang-RH", | ||
"tzhou5", | ||
"yingzhanredhat", | ||
"yufchang", | ||
"jtaleric", | ||
"svetsa-rh", | ||
"radtriste" | ||
] | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
ci-operator/step-registry/rosa/test/e2e/pull-request/rosa-test-e2e-pull-request-ref.yaml
This file contains 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,22 @@ | ||
ref: | ||
as: rosa-test-e2e-pull-request | ||
from: rosa-aws-cli | ||
grace_period: 10m | ||
commands: rosa-test-e2e-pull-request-commands.sh | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 300Mi | ||
env: | ||
- name: OCM_LOGIN_ENV | ||
default: "staging" | ||
documentation: The environment for rosa login. The supported values are [production, staging, integration]. | ||
- name: REGION | ||
default: "" | ||
documentation: Use a specific AWS region, overriding the LEASED_RESOURCE environment variable in the cluster_profile. | ||
- name: TEST_LABEL_FILTERS | ||
default: "" | ||
documentation: The filters for picking up the test scenarios. | ||
|
||
documentation: |- | ||
Do rosacli pull request presubmit testing . |