-
-
This snippet contains error - all aliases must be defined before they used. In fact, now it's not a valid yaml.
But if we define alias jobs first, and then define test, everything works.
stages: - test # aliases must be defined before they used .script-1: &script-1 | # This is a shell multi-line script to be included export S1_RANDOM=$(cat /dev/urandom | LC_TYPE=C tr -dc "[:alpha:]" | head -c 16) echo "random: $S1_RANDOM" .script-2: &script-2 | # This is a shell multi-line script to be included export S2_RANDOM=$(cat /dev/urandom | LC_TYPE=C tr -dc "[:alpha:]" | head -c 16) echo "random: $S2_RANDOM" test: stage: test image: alpine script: - *script-1 - *script-2
-
-
🎲 @santhoshtpixlerIs it possible to use something like this inside multiline script.
if [[ ! -z "$DEBUG" ]] && [[ "$DEBUG" == "true" ]]; then JPDA="jpda" export JPDA_SUSPEND=y export JPDA_ADDRESS=0.0.0.0:8000 fi```