Skip to content
Snippets Groups Projects
Verified Commit f82edd7b authored by Matthew Clarkson's avatar Matthew Clarkson
Browse files

feat: all multiple run command environment variable replacements

parent cfd894ce
1 merge request!3feat: all multiple run command environment variable replacements
Pipeline #5371 passed with stages
in 2 minutes
......@@ -20,6 +20,9 @@ spec:
default: .
key:
default: "bazelisk-1"
variables:
default: |
CI_PROJECT_DIR
---
.bazelisk-fragment:
rc:
......@@ -27,8 +30,12 @@ spec:
- |
# Copying Bazel run commands
set -euo pipefail
VARIABLES="${VARIABLES-$[[inputs.variables]]}"
while IFS= read -r LINE; do
printf '%s\n' "${LINE//\$\{CI_PROJECT_DIR\}/${CI_PROJECT_DIR}}" >> "$[[inputs.dst]]"
for VARIABLE in ${VARIABLES}; do
LINE="${LINE//\$\{${VARIABLE}\}/${!VARIABLE}}"
done
printf '%s\n' "${LINE}" >> "$[[inputs.dst]]"
done < "$[[inputs.src]]"
- popd
execute:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment