summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-10-07 16:21:04 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-10-07 16:21:04 +0000
commit06588307e61f28f659907803b3c45fc0b93b74b5 (patch)
tree04fadaf45ddf4b6b449f6f02ae0f8f007b21e7df
parentf982f1b4e23ccbb57ae103938d27854cc25183f4 (diff)
downloadjenkins-scripts-06588307e61f28f659907803b3c45fc0b93b74b5.tar.gz
jenkins-helpers.sh (convert_args_to_variables): Handle secrets
Change-Id: Id29f7cd60296d70472eacc56035e5b51745be682
-rw-r--r--jenkins-helpers.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index ff3f2035..7290eea9 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -916,6 +916,8 @@ manifest_out ()
# Process "--var value" and "++arr elem" arguments and define corresponding
# variables and arrays.
# "--var value" defines shell variable "$var" to "value".
+# "__var value" defines shell variable "$var" to "value", but doesn't store
+# it to the manifest. This is useful for passing secrets.
# "++arr elem" defines shell array "$arr[@]" and adds "elem" to it.
# "==arr[key] value" defines shell associative array "$arr[@]" and sets
# "${arr[key]}" to "value".
@@ -950,6 +952,11 @@ declare -g "$name=$2"
EOF
num=2
;;
+ "__"*)
+ name="${1#__}"
+ declare -g "$name=$2"
+ num=2
+ ;;
"++"*)
name="${1#++}"
if ! test_array $name; then