Work flow I want to create
build.properties
file.build.properties
injects them as environment variable, so it possible to use them everywhere in the job.
I got such exception instead:
[EnvInject] - Loading node environment variables.
Building remotely on master-worker (lucid) in workspace /data/jenkins/workspace/QA-350_MultiJob
[QA-350_MultiJob] $ /bin/sh -xe /tmp/hudson757569632298940894.sh
+ curl --user **** -X POST --header Content-Type: application/json --header Accept: */* -d {
"description": "string",
"mode": "DEFAULT",
"name": "string",
"start_time": "2015-11-05T13:26:40.626Z",
"tags": [
"string"
]
} https://****
+ jq .id
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 144 0 286 --:--:-- --:--:-- --:--:-- 286
0 33 0 33 0 144 49 215 --:--:-- --:--:-- --:--:-- 0
+ ID = "563c8d3ae4b0bf061cd3d999"
/tmp/hudson757569632298940894.sh: 1: ID: not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
You do not need to add anything in "Properties Content", as long as the file you are pointing to in "Properties File Path" contains variable assignments (e.g. ID = 123).
You should than have the variable from the file loaded to the job's environment.
Came across this and was having a VERY similar problem..
Same error message informing me that the variable name I was trying create was not found (notice for this question are trying to create a variable named ID and the error is telling us that 'ID is not found')
If you remove the spaces around 'ID = ${curl ' it should resolve the issue.
Variable creation in shell scripts requires no spaces to be used. Example: MY_VARIABLE="my value"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With