3

I am trying to bulk set the environment variables for a Heroku pipeline since Heroku does not use the parent's environment variables in the pipeline anymore in the new version.

https://devcenter.heroku.com/articles/review-apps-new#configuration

I tried these but they don't work. I couldn't find any documentation for this. Any help would be much appreciated. Thanks.

heroku config:set KEY1=VALUE1 KEY2=VALUE2 --app my-pipeline

heroku config:set KEY1=VALUE1 KEY2=VALUE2 --pipeline=my-pipeline
myo
  • 111
  • 4

1 Answers1

0

You can copy all env var from another app as described here:

CONFIG_VARS=$(echo $(heroku config -a APPLICATION_NAME --json)) && curl -n -X PATCH https://api.heroku.com/pipelines/PIPELINE_ID}/stage/review/config-vars -d "$CONFIG_VARS" -H "Content-Type: application/json" -H "Accept: application/vnd.heroku+json; version=3"

Switch out APPLICATION_NAME with your app name and PIPELINE_ID witht the id of the pipeline you want to copy config vars to.

Robert Bue
  • 1,774
  • 2
  • 11
  • 14