bazooka-ci / bazooka

Continuous Integration and Continuous Deployment Server
http://docs.bazooka-ci.io/
MIT License
60 stars 5 forks source link

Allow job parameters #177

Closed haklop closed 9 years ago

haklop commented 9 years ago

We can now use bzk job start for injecting parameters to the job:

Usage: bzk job start PROJECT_ID [SCM_REF] [--env...]

Start a new bazooka job on a project

Arguments:
  PROJECT_ID=""      the project id
  SCM_REF="master"   the scm ref to build

Options:
  -e, --env=[]string(nil)   define an environment variable for the job

E.g.: bzk job start my-project my-branch -e A=3 -e B=42

Permutation can be created by settings multiple times the same variable: `bzk job start my-project my-branch -e A=3 -e A=5``

Settings defined on the project's configuration map are also injected.

The .bazooka.yml can define mandatory parameters by adding an entry in the env section without value:

env:
  - A
  - B=5

A has to be defined on the project's configuration map or at the start of the job.

Parameters are exposed as environment variable.

Closes #129