-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathscrewdriver.yaml
53 lines (53 loc) · 1.5 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
50
51
52
53
shared:
image: node:6
jobs:
main:
steps:
- print: echo Starting main job!
- set_meta: |
foo=$(meta get "foo")
echo "foo is $foo"
if [ "$foo" = "null" ] || [ -z "$foo" ]; then
echo "foo is null or empty"
meta set "foo" "foobar"
else
echo "foo is not null"
meta set "foo" "${foo}foobar"
fi
requires:
- ~pr
- ~commit
- ~sd@15512:main
second:
steps:
- print: echo Starting second job!
- check_meta: test `meta get "foo"` != "null" -a `meta get "foo"` != ""
- set_meta: meta set "bar" "barbaz"
requires:
- main
third:
steps:
- print: echo Starting third job!
- check_meta: test "barbaz" = `meta get "bar"`
requires:
- second
fourth:
requires:
- third
annotations:
screwdriver.cd/virtualJob: true
steps:
- print: echo "echo Starting fourth job!"
fifth:
requires:
- fourth
steps:
- print: |
echo "foo: $(meta get "foo")"
echo "bar: $(meta get "bar")"
detached:
parameters:
p1: p1
steps:
- print: echo Starting detached job!
- check_meta: test "barbaz" = `meta get "bar"`