-
Notifications
You must be signed in to change notification settings - Fork 43
Project DSL
Projects are the skeleton of your pipeline. Each project sets some values and then declares which jobs, views, and promotions are included. It is common to store all of your projects in a single file, but you can store them in as many files as you want. Because you can/override variables in projects you can have a different project for different environments. Each project would provide the environment variable and anything else that's custom to that environment, but likely include the same jobs.
The name variable in a project works like any other variable, but it is also used to specify a single project when running the generator.
- defaults:
my_var: 'default'
- project:
name: 'Project 1'
my_var: 'project1'
jobs:
- '{{name}}-Job1'
- '{{name}}-Job2':
my_var: 'Job2'
- project:
name: 'Project 2'
jobs:
- '{{name}}-Job1'
- '{{name}}-Job2'
views:
- '{{name}}-View}'
promotions:
- '{{name}} Prod Promotion'
- '{{name}} Stage Promotion'
There are three levels of priority for variable resolution. Job specific variables take priority over project specific variables which take priority over default values.
In the example yaml above there are two projects each with two jobs. If we ran the generator on both projects we would create the following four jobs.
- 'Project 1-Job1' with my_var equal to 'project1'
- 'Project 1-Job2' with my_var equal to 'Job2'
- 'Project 2-Job1' with my_var equal to 'default'
- 'Project 1-Job1' with my_var equal to 'default'