Skip to content

Commit 1d78be8

Browse files
author
Lachlan Donald
committed
Use the new dag experiment for better parallel ordering
1 parent dc7ce1d commit 1d78be8

File tree

1 file changed

+39
-20
lines changed

1 file changed

+39
-20
lines changed

.buildkite/pipeline.yml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,96 @@
1+
dag: true
2+
13
steps:
2-
- name: ":bash: Lint"
4+
- id: "lint"
5+
name: ":bash: Lint"
36
command: .buildkite/steps/lint.sh
47
agents:
58
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
69

7-
- name: ":bash: Unit tests"
10+
- id: "bats-tests"
11+
name: ":bash: Unit tests"
812
agents:
913
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
1014
plugins:
1115
docker-compose#v2.1.0:
1216
run: unit-tests
1317
config: docker-compose.unit-tests.yml
1418

15-
- wait
16-
- name: ":packer: :windows:"
19+
- id: "packer-windows"
20+
name: ":packer: :windows:"
1721
command: .buildkite/steps/packer.sh windows
1822
agents:
1923
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
24+
depends_on:
25+
- "lint"
26+
- "bats-tests"
2027

21-
- wait
22-
- name: ":cloudformation: :windows: Launch"
28+
- id: "windows-launch"
29+
name: ":cloudformation: :windows: Launch"
2330
command: .buildkite/steps/launch.sh windows
2431
agents:
2532
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
2633
artifact_paths: "build/aws-stack.yml"
34+
depends_on: "packer-windows"
2735

28-
- wait
29-
- name: ":cloudformation: :windows: Test"
36+
- id: "windows-test"
37+
name: ":cloudformation: :windows: Test"
3038
command: "docker info"
3139
timeout_in_minutes: 5
3240
agents:
3341
stack: "buildkite-aws-stack-test-windows-${BUILDKITE_BUILD_NUMBER}"
3442
queue: "testqueue-windows-${BUILDKITE_BUILD_NUMBER}"
43+
depends_on: "windows-launch"
3544

36-
- wait
37-
- name: ":packer: :linux:"
45+
- id: "packer-linux"
46+
name: ":packer: :linux:"
3847
command: .buildkite/steps/packer.sh linux
3948
agents:
4049
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
50+
depends_on:
51+
- "lint"
52+
- "bats-tests"
4153

42-
- wait
43-
- name: ":cloudformation: :linux: Launch"
54+
- id: "linux-launch"
55+
name: ":cloudformation: :linux: Launch"
4456
command: .buildkite/steps/launch.sh linux
4557
agents:
4658
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
4759
artifact_paths: "build/aws-stack.yml"
60+
depends_on: "packer-linux"
4861

49-
- wait
50-
- name: ":cloudformation: :linux: Test"
62+
- id: "linux-test"
63+
name: ":cloudformation: :linux: Test"
5164
command: "goss validate --format documentation"
5265
timeout_in_minutes: 5
5366
agents:
5467
stack: "buildkite-aws-stack-test-linux-${BUILDKITE_BUILD_NUMBER}"
5568
queue: "testqueue-linux-${BUILDKITE_BUILD_NUMBER}"
69+
depends_on: "linux-launch"
5670

57-
- wait
58-
- name: ":cloudformation: 🚚 🌎"
71+
- id: "copy-ami"
72+
name: ":cloudformation: 🚚 🌎"
5973
command: .buildkite/steps/copy.sh
6074
agents:
6175
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
6276
artifact_paths: "build/mappings.yml"
77+
depends_on:
78+
- "linux-test"
79+
- "windows-test"
6380

64-
- wait
65-
- name: ":cloudformation: :rocket:"
81+
- id: "publish"
82+
name: ":cloudformation: :rocket:"
6683
command: .buildkite/steps/publish.sh
6784
agents:
6885
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
6986
concurrency_group: "aws-stack-publish"
7087
concurrency: 1
7188
artifact_paths: "build/*.yml"
89+
depends_on: "copy-ami"
7290

73-
- wait
74-
- name: "Cleanup"
91+
- id: "cleanup"
92+
name: "Cleanup"
7593
command: .buildkite/steps/cleanup.sh
7694
agents:
7795
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
96+
depends_on: "publish"

0 commit comments

Comments
 (0)