# Adding a variable through Jenkins

**URL:** <https://community.postman.com/t/adding-a-variable-through-jenkins/27525>\
**Category:** Help Hub\
**Tags:** newman-project, variables, jenkins\
**Created:** [September 6, 2021, 12:59pm UTC](https://community.postman.com/t/adding-a-variable-through-jenkins/27525 "2021-09-06T12:59:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weronika](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@Weronika](https://community.postman.com/u/Weronika)\
**Post date:** [September 6, 2021, 12:59pm UTC](https://community.postman.com/t/adding-a-variable-through-jenkins/27525/1 "2021-09-06T12:59:11Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

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 ☹

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

I’ll be much obliged for any help!

---

<div class="post-metadata">

**Author:** ![Weronika](https://avatars.discourse-cdn.com/v4/letter/w/e9a140/32.png) [@Weronika](https://community.postman.com/u/Weronika)\
**Post date:** [September 6, 2021, 2:01pm UTC](https://community.postman.com/t/adding-a-variable-through-jenkins/27525/2 "2021-09-06T14:01:46Z")

</div>

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! 🙂
