Override environment variable created locally in Jenkins -


i have 2 properties files wish send content via mail. so:

  1. read files envinject

enter image description here

  1. use varibles send via mail: enter image description here

those config files containing different link , date see in email same output:

android mobile client release notes ch  link: ftp://testlink_ch date: 28/06/2016  android mobile client release notes pl  link: ftp://testlink_ch date: 28/06/2016 

whitch meanns when ${link} set not oveeriden if try "unset" command.

[envinject] - injecting environment variables build step. [envinject] - injecting environment variables properties file path 'androiddev/ch/config.properties' [envinject] - variables injected successfully. [envinject] - injecting environment variables properties content  link_ch=${link} date_ch=${date}  [envinject] - variables injected successfully. [mvandroid] $ /bin/sh -xe /tmp/hudson108948632979693109.sh + unset link + unset date [envinject] - injecting environment variables build step. [envinject] - injecting environment variables properties file path 'androiddev/pl/config.properties' [envinject] - variables injected successfully. [envinject] - injecting environment variables properties content  link_pl=ftp://testlink_ch date_pl=28/06/2016 

can please me or give me incite on this?

the reason happening lies in way env-inject plugin works. if use both "properties file path" , "properties content" fields in 1 invocation, not processed sequentially instead handled in parallel. therefore, when setting $linkpl, value of $link still old. solution make 2 env-inject steps, 1 inject props file , next make use of results.

example:

enter image description here

output:

enter image description here

additionally, cannot unset value of variable in shell step way attempting it. unsetting affect shell step.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -