-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Iaroslav Sydoruk <[email protected]>
- Loading branch information
Showing
8 changed files
with
129 additions
and
49 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,25 @@ | ||
# Important: all variables must start with CI_ENV_ | ||
# otherwise it will not be replaced! | ||
|
||
export CI_ENV_MOFED_VER="24.07-0.6.1.0" | ||
export CI_ENV_REGISTRY_AUTH_FILE="/mnt/secret_podman/config_podman.json" | ||
export CI_ENV_GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" | ||
export CI_ENV_STORAGE_DRIVER="overlay" | ||
|
||
export CI_ENV_NVCR_REGISTRY_HOST="nvcr.io" | ||
export CI_ENV_NVCR_REGISTRY_PATH="nvstaging/doca" | ||
|
||
export CI_ENV_HARBOR_REGISTRY_HOST="nbu-harbor.gtm.nvidia.com" | ||
export CI_ENV_HARBOR_REGISTRY_PATH="swx-storage/doca_nvmf_target_offload" | ||
|
||
export CI_ENV_ARTIFACT_PROPERTIES="/mnt/pvc/doca-sta-artifact.properties" | ||
|
||
export CI_ENV_DOCA_BUILDER_IMAGE="nvcr.io/nvstaging/doca/doca" | ||
export CI_ENV_DOCA_RUNTIME_TAG="2.10.0045-full-rt-ubuntu22.04-arm64" | ||
export CI_ENV_DOCA_BUILDER_TAG="2.10.0045-devel-ubuntu22.04-arm64" | ||
|
||
# Change this revision number always when you make any | ||
# changes that affect components in CI builder images. | ||
# CI builder images use it as docker tag. | ||
# Format=<YYMMDD>-<ID> | ||
export CI_ENV_CI_REV="241220-1" |
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,57 @@ | ||
#!/bin/bash -eE | ||
|
||
SCRIPT=$(readlink -f "$0") | ||
SCRIPTPATH=$(dirname "$SCRIPT") | ||
|
||
info() { | ||
echo "[$0] [INFO]: $1" | ||
} | ||
|
||
error() { | ||
echo "[$0] [ERROR]: $1" | ||
} | ||
|
||
# conf_file checks | ||
if [ -z "${conf_file}" ]; then | ||
error "ENV variable 'conf_file' is not defined!" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -e "${conf_file}.in" ]; then | ||
error "Template ${conf_file}.in isn't found!" | ||
exit 1 | ||
fi | ||
|
||
# CI env path checks | ||
if [ -z "${CI_ENV_PATH}" ]; then | ||
info "CI_ENV_PATH isn't defined. Using default: ${SCRIPTPATH}/ci_env.sh" | ||
CI_ENV_PATH="$SCRIPTPATH/ci_env.sh" | ||
fi | ||
|
||
if [ ! -e "$CI_ENV_PATH" ]; then | ||
error "CI env file ${CI_ENV_PATH} doesn't exist!" | ||
exit 1 | ||
fi | ||
|
||
info "CI env file: $CI_ENV_PATH" | ||
cat $CI_ENV_PATH | ||
|
||
CI_ENV_VARS=$(grep '^export CI_ENV_' $CI_ENV_PATH | sed 's/^export \(CI_ENV_[^=]*\)=.*$/\$\1/' | tr '\n' ' ') | ||
|
||
if [ -z "$CI_ENV_VARS" ]; then | ||
error "CI Variables not found in the $CI_ENV_PATH!" | ||
exit 1 | ||
fi | ||
|
||
source $CI_ENV_PATH | ||
|
||
if ! type -p envsubst; then | ||
info "envsubst isn't found. Trying to install it..." | ||
apt update | ||
apt install -y gettext-base | ||
fi | ||
|
||
envsubst "$CI_ENV_VARS" < ${conf_file}.in > ${conf_file} | ||
|
||
info "Created ${conf_file}:" | ||
cat "${conf_file}" |
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
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
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