-
Notifications
You must be signed in to change notification settings - Fork 35
/
post_habitat_release.pipeline.yml
114 lines (101 loc) · 3.45 KB
/
post_habitat_release.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Tasks that must be performed after a successful release of Habitat.
expeditor:
secrets:
PIPELINE_HAB_AUTH_TOKEN:
path: account/static/habitat/chef-ci
field: auth_token # Production Builder
GITHUB_TOKEN:
account: github/habitat-sh
field: token
accounts:
- aws/habitat # for uploading the bootstrap bundle
defaults:
buildkite:
timeout_in_minutes: 30
env:
HAB_ORIGIN: "habitat"
PIPELINE_HAB_BLDR_URL: "https://bldr.habitat.sh"
GITHUB_USER: "habitat-sh" # per https://github.com/github/hub/issues/2264#issuecomment-567241335
steps:
- label: ":rust: Cargo update"
command:
- .expeditor/scripts/post_habitat_release/cargo_update.sh
expeditor:
account:
- github
executor:
docker:
environment:
- GITHUB_USER
soft_fail: true
# We build new releases of habitat/builder-worker now since they
# pull in the new Habitat release we just created (specifically, the
# studio and build program).
#
# We then promote them to the acceptance channel, from which workers
# in our acceptance environment will update themselves. Once we try
# building some packages in acceptance, we can unblock this pipeline
# to have them automatically promoted to the stable channel,
# allowing our production workers to then update.
- label: "[:linux: build habitat/builder-worker]"
command:
- .expeditor/scripts/post_habitat_release/build_worker.sh
expeditor:
executor:
docker:
privileged: true
environment:
- HAB_ORIGIN
- BUILD_PKG_TARGET=x86_64-linux
- label: "[:linux: :two: build habitat/builder-worker]"
command:
- .expeditor/scripts/post_habitat_release/build_worker.sh
expeditor:
executor:
docker:
privileged: true
environment:
- HAB_ORIGIN
- BUILD_PKG_TARGET=x86_64-linux-kernel2
- label: "[:windows: build habitat/builder-worker]"
command:
- powershell .expeditor/scripts/post_habitat_release/build_worker.ps1
expeditor:
executor:
docker:
host_os: windows
environment:
- HAB_ORIGIN
- BUILD_PKG_TARGET=x86_64-windows
- BUILDKITE_AGENT_ACCESS_TOKEN
- wait
- label: "Promote to habitat/builder-worker to acceptance"
command:
- .expeditor/scripts/post_habitat_release/promote_packages_to_channel.sh acceptance
expeditor:
executor:
docker:
privileged: true
- block: "Evaluate habitat/builder-worker in Acceptance"
prompt: |
The previous promotion step made these habitat/builder-worker
packages available in our Acceptance workers. Please try
building packages in acceptance to ensure they behave properly.
When you are satisfied, please unblock this step to promote the
same packages to the stable channel, where they will be consumed
by our Production builders.
- label: "Promote habitat/builder-worker to stable"
command:
- .expeditor/scripts/post_habitat_release/promote_packages_to_channel.sh stable
expeditor:
executor:
docker:
privileged: true
- wait
# We do this after building and promoting new workers to ensure the
# bundle contains those workers.
- label: ":s3: Create new Bootstrap Bundle"
command: ".expeditor/scripts/generate_bootstrap_bundle.sh"
expeditor:
executor:
docker: