forked from screwdriver-cd-test/quickstart-generic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screwdriver.yaml
49 lines (48 loc) · 2.32 KB
/
screwdriver.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
# Shared definition block
# This is where you would define any attributes that all your jobs will
# inherit. In our example, we state that all our Jobs will use the same Docker
# container for building in.
shared:
# Docker image to use as the desired build container. This typically takes the
# form of "repo_name". Alternatively, you can define the image as
# "repo_name:tag_label".
#
# (Source: https://hub.docker.com/r/library/buildpack-deps/)
image: buildpack-deps
# Job definition block
# "main" is a default job that all pipelines have
jobs:
# Jobs are defined by name.
# All pipelines have "main" implicitly defined. The definitions in your
# screwdriver.yaml file will override the implied defaults.
main:
# Requires is a single job name or array of job names that will trigger the job to run.
# Jobs defined with "requires: ~pr" are started by pull-request events.
# Jobs defined with "requires: ~commit" are started by push events.
# Jobs defined with "requires: ~sd@123:main" are started by job "main" from pipeline "123".
# Jobs defined with "requires: main" are started after "main" is done.
# Jobs defined with "requires: [deploy-west, deploy-east] are started after "deploy-west" and "deploy-east" are both done running successfully.
requires: [~pr, ~commit]
# Steps is the list of commands to execute.
steps:
# Each step takes the form "step_name: command_to_run".
# The "step_name" is a convenient label to reference it by. The
# "command_to_run" is the single command that is executed during this
# step. Environment variables will be passed between steps, within
# the same job (as shown below).
- export: export GREETING="Hello, world!"
- hello: echo $GREETING
# We define another Job called "second_job". In this Job, we intend on running
# a different set of commands.
second_job:
requires: main
steps:
# The "make_target" step calls a Makefile target to perform some set of
# actions. This is incredibly useful when you need to perform a multi-line
# command.
- make_target: make greetings
# The "run_arbitrary_script" executes a script. This is an alternative to
# a Makefile target where you want to run a series of commands related to
# this step
- run_arbitrary_script: ./my_script.sh