Victor Seva 4897d5e047 Story 2011112: include-raw-verbatim fails on job-template
don't expand IncludeRawVerbatim twice

> FAILED tests/loader/test_loader.py::test_include_job[include002] - jenkins_jobs.errors.JenkinsJobsException: While formatting string "#!/bin/bash\n#\n# sample script to check that variables aren't expanded\n# when usi...": Missing parameter: 'VAR1'
> FAILED tests/loader/test_loader.py::test_include[include002] - jenkins_jobs.errors.JenkinsJobsException: While formatting string "#!/bin/bash\n#\n# sample script to check that variables aren't expanded\n# when usi...": Missing parameter: 'VAR1'

Change-Id: I88b22987eabe99f00d99755299256d4aba8a1c76
2024-05-08 06:22:28 +00:00

15 lines
281 B
Bash

#!/bin/bash
#
# sample script to check that variables aren't expanded
# when using the !include-raw-verbatim: application yaml tag
VAR1="hello"
VAR2="world"
VAR3="${VAR1} ${VAR2}"
[[ -n "${VAR3}" ]] && {
# this next section is executed as one
echo "${VAR3}"
exit 0
}