Hi,
Usual way to do this it like that:
------------>8
---------------------------
- builders:
- shell: |
#!/bin/bash -xe
echo "Here we somehow populate my_var_1 and my_var_2
variables:"
my_var_1="My value 1"
my_var_2="My value 2"
# Note: No double quotes around values here
# because MY_VARS.envvar is not a bash file,
# but a Java properties file.
echo -n > MY_VARS.envvar
echo "MY_VAR_1=$my_var_1" >> MY_VARS.envvar
echo "MY_VAR_2=$my_var_2" >> MY_VARS.envvar
- inject:
properties-file: MY_VARS.envvar'
# Now, we have MY_VAR_1 and MY_VAR_2 in the environment:
- shell: |
#!/bin/bash -xe
echo "MY_VAR_1=$MY_VAR_1"
echo "MY_VAR_2=$MY_VAR_2"
publishers:
# Store .envvar files - very useful for job debugging.
- archive:
artifacts: '*.envvar'
allow-empty: 'true'
------------
8<---------------------------
Vsevolod.
--
You received this message because you are subscribed to the Google Groups "jenkins-job-builder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins-job-bui...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkins-job-builder/e667f7f6-78cd-494f-b643-2f0f24214f7fn%40googlegroups.com.