How to inject environment variables on manual job start

We’re looking into migrating to circleCI, mainly because it has a clean UI and can handle both linux and OSX builds, but we’re not able to setup something basic, like we have with Jenkins/Bitrise combination right now:

We have two main branches -dev and master- and three servers -dev, staging and prod-
We should need to be able to:

  • Build & deploy dev with dev environment variables to the dev server
  • Build & deploy dev with staging environment variables to the staging server
  • Build & deploy master with dev environment variables to the dev server
  • Build & deploy master with staging environment variables to the staging server
  • Build & deploy master with production environment variables to the prod server

If we commit something to dev or merge dev to master, we would need to be able to trigger such a job manually.

I must be overlooking something, since I haven’t found any way to do this.
Any help is appreciated

It looks like you have three sets of vars. I would suggest:

  • Naming your env vars dev_x, dev_y, and so forth
  • Doing builds on tag pushes
  • Using a special tag form environment-dev or environment-dev-buildno, which can be parsed to form an env var prefix

Is that worth a try?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.