Reputation: 49
When running Newman in Jenkins is it possible/allowed to use multiple environment files for the Newman run... for example, the following, so that the main variables are in the base environment file but then the stack-specific variables overwrite them where needed :
try {
sh """
newman run monitoring.json \
-e environments/${env}/environment.json \
-e environments/${env}/${colour}/environment.json \
--env-var "a=1" \
--env-var "b=2" \
--insecure \
--reporters cli,junit
"""
}catch (exec){
currentBuild.result = 'UNSTABLE'
}
This would then save me having to maintain duplicate big environment files, just for the sake of overwriting a couple of variables.
Alternatively, if you're only allowed one environment file, would/do the env-vars overwrite the value from the environment file?
Thanks in advance!
Upvotes: 0
Views: 23