I am trying to do the following run newman within a jenkins pipeline. I am executing newman test using docker. However, my collection script has a few variables that need to be set that are dependent on the jenkins pipeline env. (i.e. since each jenkins build happens within a container, I need to find the IP address of that container and pass it on to the newman env JSON)...
for example in the following env config json:
{
"id": "a14232bb-48d3-3494-7e6f-f4f34e6331a4",
"name": "testEnv",
"values": [
{
"enabled": true,
"key": "hostname",
"value": "$IPADDRESS",
"type": "text"
},
{
"enabled": true,
"key": "port",
"value": "$PORT",
"type": "text"
}
],
"timestamp": 1504039485918,
"_postman_variable_scope": "environment",
"_postman_exported_at": "2017-08-29T20:44:53.396Z",
"_postman_exported_using": "Postman/5.1.3"
}
can the $PORT and $IPADDRESS be extracted from the shell env ?
- is this something that can be done
- Can we embed env command within the env file so that it gets interpretted when executed/used as part of the execution