Adding a variable through Jenkins

Hi there!

I’m trying to integrate Postman/Newman with Jenkins. Everything is working like a charm.

But there is one environmental variable that is changing for my environments a lot (let’s say it’s environment_access_token) and I wanted to use it as a parameter at Jenkins, so I could type in the environment_access_token value in Jenkins when starting the build and so Newman would use this environment_access_token variable during the test run.

Is that possible? I’m having a hard time with it. And without it it would not make sense to use CI in my situation, as I need to edit environment_access_token at Postman/at json file all the time :frowning:

TLDR: how to pass a variable and its value from Jenkins to Newman?

I’ll be much obliged for any help!

Ok, I’ve found a solution.
I’ve added string parameter to the Jenkins build, let’s say it’s called “test” and then I’ve added this to the build settings --env-var test=%test% (Windows batch command), and it’s doing its job! :slight_smile: