Skip to content
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

CI: Fix missing CLUSTER_NAME #972

Merged
merged 3 commits into from
Oct 12, 2022
Merged
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
10 changes: 8 additions & 2 deletions scripts/ci/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ ensure_CI() {
fi
}

# ci_export is a wrapper around export. This is here for legacy purposes.
# ci_export is a wrapper around cci-export which persists exported variables
# between bash processes.
ci_export() {
if [[ "$#" -ne 2 ]]; then
die "missing args. usage: ci_export <env-name> <env-value>"
Expand All @@ -23,7 +24,11 @@ ci_export() {
local env_name="$1"
local env_value="$2"

export "$env_name"="$env_value"
if command -v cci-export >/dev/null; then
cci-export "$env_name" "$env_value"
else
export "$env_name"="$env_value"
fi
}

ci_exit_trap() {
Expand Down Expand Up @@ -485,6 +490,7 @@ openshift_ci_mods() {
# For ci_export(), override BASH_ENV from stackrox-test with something that is writable.
BASH_ENV=$(mktemp)
export BASH_ENV
info "BASH_ENV is now ${BASH_ENV}"

# These are not set in the binary_build_commands or image build envs.
export CI=true
Expand Down