The following is my current pipeline: stage ("My Stage") { environment { cloudcerts_iamConfig_preprod = credentials( '${cloudcerts_iamConfig_preprod}') } steps { // Setup packages and run tests sh ''' npm install npm test ''' } }
During runtime of the tests, "cloudcerts_iamConfig_preprod" is available via process.env and everything is great. My requirement now however is to add another property dynamically. To do this I ticked the checkbox "This project is parameterized" > String parameter, and provided a name and default value (myStringParameter, "xxx"). I then added to "environments": myProperty = ${myStringParameter) However when the tests run process.env.myProperty returns "undefined". Is this the right way to pass the parameter? Is there a different way? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3bb3b123-046a-4c6b-8a7e-655b76a2b5a4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.