|
| 1 | +--- |
| 2 | +# Workflow list definition |
| 3 | +# This list describes the order that the Jobs execute. The "main" job is always |
| 4 | +# executed first, followed in order of the Jobs listed in this Workflow block |
| 5 | +workflow: |
| 6 | + # "second_job" is the name of the Job that runs after "main" |
| 7 | + - second_job |
| 8 | + |
| 9 | +# Shared definition block |
| 10 | +# This is where you would define any attributes that all your jobs will |
| 11 | +# inherit. In our example, we state that all our Jobs will use the same Docker |
| 12 | +# container for building in. |
| 13 | +shared: |
| 14 | + # Docker image to use as the desired build container. This typically takes the |
| 15 | + # form of "repo_name". Alternatively, you can define the image as |
| 16 | + # "repo_name:tag_label". |
| 17 | + # |
| 18 | + # (Source: https://hub.docker.com/r/library/buildpack-deps/) |
| 19 | + image: buildpack-deps |
| 20 | + |
| 21 | +# Job definition block |
| 22 | +# "main" is a default job that all pipelines have |
| 23 | +jobs: |
| 24 | + # Jobs are defined by name. |
| 25 | + # All pipelines have "main" implicitly defined. The definitions in your |
| 26 | + # screwdriver.yaml file will override the implied defaults. |
| 27 | + main: |
| 28 | + # Steps is the list of commands to execute. |
| 29 | + steps: |
| 30 | + |
| 31 | + # Each step takes the form "step_name: command_to_run". |
| 32 | + # The "step_name" is a convient label to reference it by. The |
| 33 | + # "command_to_run" is the single command that is executed during this |
| 34 | + # step. |
| 35 | + - hello: echo hi world |
| 36 | + # We define another Job called "second_job". In this Job, we intend on running |
| 37 | + # a different set of commands. |
| 38 | + second_job: |
| 39 | + steps: |
| 40 | + # The "make_target" step calls a Makefile target to perform some set of |
| 41 | + # actions. This is incredibly useful when you need to perform a multi-line |
| 42 | + # command. |
| 43 | + - make_target: make greetings |
| 44 | + # The "run_arbitrary_script" executes a script. This is an alternative to |
| 45 | + # a Makefile target where you want to run a series of commands related to |
| 46 | + # this step |
| 47 | + - run_arbitrary_script: ./my_script.sh |
0 commit comments