Per-job environment variables.
Description
We currently use Jenkins CI and we're looking into moving some or all of our CI services to GitLab CI. We're already using it for one internal project and loving it.
I don't know how much Jenkins experience the reader has, so here is a quick summary that some can skip. There are many jobs and jobs have builds. A build is an individual run of a job. Jobs themselves have no parent, but can be categorised and tagged. A job itself has defined by some options regarding notifications etc, but mainly consists of the script that is to be run in order to run a "build". There are essentially just shell scripts.
Because we can have many jobs, which are clones of each others (there is a clone job function) - each individual team member has their own job. That job is configured to build different branches. GitLab CI can kinda get us this, in that we can get a build per branch. The trick bit is that we build our application for a number of different configurations, decided by environment variables passed to the build process.
I can't see a way we could have identical build configs on the same branch with different environment variables. A simplified example follows:
MARKET=nz
bundle exec rails test
MARKET=au
bundle exec rails test
etc.
Proposal
I'm proposing a way for environment variables to be configured on a per "build job" basis. That is, it should be possible for me to have a series of builds on a single branch (master in some cases, specific release branches in other cases) with different configuration options passed to those builds via environment variables.
To put it simply, I'd like to specific environment variables on a per job (pipeline?) basis, as we currently can on a per project bases.
I fully expect this is not trivial. I don't entirely know enough to start on this, but I'd be keen to collaborate to get this done if it's something the GitLab team is interested in.