-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ROX-23263: prepare e2e testing in CI on infra clusters (#1940)
* add begin/end.sh * set worker config in begin.sh * new logic to resolve jwks keys on infra ocp
- Loading branch information
1 parent
ed60c3c
commit a0fec88
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
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,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The initial script executed for openshift/release CI jobs. | ||
set -euo pipefail | ||
|
||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)" | ||
# shellcheck source=scripts/ci/lib.sh | ||
source "$ROOT/scripts/ci/lib.sh" | ||
|
||
# This file is used to fit into the ocp 4 infra cluster workflow defined in: | ||
# https://github.com/openshift/release/blob/master/ci-operator/step-registry/stackrox/automation-flavors/ocp-4-e2e/stackrox-automation-flavors-ocp-4-e2e-workflow.yaml | ||
|
||
log "Running stackrox OSCI workflow" | ||
log "Setting worker node type and count for OCP 4 jobs" | ||
set_ci_shared_export WORKER_NODE_COUNT 2 | ||
set_ci_shared_export WORKER_NODE_TYPE e2-standard-8 |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)" | ||
# shellcheck source=scripts/ci/lib.sh | ||
source "$ROOT/scripts/ci/lib.sh" | ||
|
||
# The initial script executed for openshift/release CI jobs. | ||
set -euo pipefail | ||
|
||
# As of now this file is only a placeholder to make the repo fit to the | ||
# workflow defined for ocp infra clusters in openshift/release repository | ||
# https://github.com/openshift/release/blob/master/ci-operator/step-registry/stackrox/automation-flavors/ocp-4-e2e/stackrox-automation-flavors-ocp-4-e2e-workflow.yaml | ||
log "End of stackrox OSCI workflow" |
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,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
# A library of CI related reusable bash functions | ||
SCRIPTS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd)" | ||
|
||
# shellcheck source=scripts/lib/log.sh | ||
source "$SCRIPTS_ROOT/scripts/lib/log.sh" | ||
|
||
ci_export() { | ||
if [[ "$#" -ne 2 ]]; then | ||
die "missing args. usage: ci_export <env-name> <env-value>" | ||
fi | ||
|
||
local env_name="$1" | ||
local env_value="$2" | ||
|
||
if command -v cci-export >/dev/null; then | ||
cci-export "$env_name" "$env_value" | ||
else | ||
export "$env_name"="$env_value" | ||
fi | ||
} | ||
|
||
# set_ci_shared_export() - for openshift-ci this is state shared between steps. | ||
set_ci_shared_export() { | ||
if [[ "$#" -ne 2 ]]; then | ||
die "missing args. usage: set_ci_shared_export <env-name> <env-value>" | ||
fi | ||
|
||
ci_export "$@" | ||
|
||
local env_name="$1" | ||
local env_value="$2" | ||
|
||
echo "export ${env_name}=${env_value}" | tee -a "${SHARED_DIR:-/tmp}/shared_env" | ||
} |