forked from HariSekhon/DevOps-Bash-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.yml
62 lines (58 loc) · 1.74 KB
/
pipeline.yml
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
54
55
56
57
58
59
60
61
62
#
# Author: Hari Sekhon
# Date: 2020-03-13 21:10:39 +0000 (Fri, 13 Mar 2020)
#
# vim:ts=2:sts=2:sw=2:et
#
# https://github.com/HariSekhon/DevOps-Bash-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# B u i l d K i t e C I
# ============================================================================ #
# BuildKite Pipeline
#
# add this command to the UI and it will read the rest of the steps from here:
#
# - command: buildkite-agent pipeline upload
# Yaml Anchors workaround to BuildKite's lack of global retries configuration - credit to Jason @ BuildKite for this workaround:
#
# https://forum.buildkite.community/t/reschedule-builds-on-other-agents-rather-than-fail-builds-when-agents-time-out-or-are-killed-machine-shut-down-or-put-to-sleep/1388/5
#
anchors:
std_retries: &std_retries
retry:
automatic:
- exit_status: -1 # Agent was lost
limit: 2
- exit_status: 255 # Forced agent shutdown
limit: 2
steps:
- command: setup/ci_bootstrap.sh
label: ci bootstrap
timeout: 30 # brew can take 10 mins just to do a brew update
branches: master
<<: [*std_retries]
- wait
- command: make init
label: init
timeout: 2
branches: master
<<: [*std_retries]
- wait
- command: make ci
label: build
timeout: 60
branches: master
<<: [*std_retries]
- wait
- command: make test
label: test
timeout: 120
branches: master
<<: [*std_retries]