Branch-Specific Environment Variables

Issue #12923 wontfix
Chris Brantley
created an issue

We deploy to different Elastic Beanstalk environments depending on the branch. For example, we have a dev branch that gets deployed to a dev environment.

The global environment variables are very helpful but it would be extremely helpful to specify environment variables that apply ONLY for certain branches. The same logic used to match the pipelines branch could apply. So for example I could specify that APPLICATION_ENVIRONMENT should be "my_dev_environment" only if the branch starts with "dev".

BTW, we are working around this by overriding the ENV variables in the build script but it would be cleaner to maintain all ENV variables in the pipelines interface.

Thanks!

Comments (4)

  1. JoshuaT staff

    Thanks Chris for the feedback. Indeed the workaround is to set the environment variables inside your configuration. This has additional benefits that it is versioned with your repository. Given that we have variables at the team and repository-level, adding branch-level variables might make it harder for other users to workout the actual variable used by the pipeline and therefore I'll close it as we are unlikely to add it for this use case.

  2. Kenny DiFiore

    It would be nice to have a solution for branch-specific variables that are sensitive, so they aren't committed to the repo and available for all who have access to the repo to see.

  3. Log in to comment