Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Project DSL

Will Paul edited this page Oct 28, 2016 · 8 revisions

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.

Project DSL

- 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'
Overriding variables

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'
Clone this wiki locally