Newman command --export-environment does not export file in CI

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question: I would like to export environment file so that I can use the updated environment file for the next collection run in the pipeline.

I’ve already tried: I tried to run the newman command locally with the below command and the environment file got exported with updated values.

newman run collection.postman_collection.json -e sample_environment.postman_environment.json --export-environment sample_environment.postman_environment.json

I gave the same command in my workflow file but the environment file is not exported because I see the value empty.

Sorry we didn’t get to this sooner. This isn’t the experience we want for our users.

We’re closing out older posts to help keep the community organized and relevant. Each CI tool stores artefacts from pipeline runs differently and you will need to consult their documentation for that information.