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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#@ load("@ytt:data", "data")
#@ load("vendor/pipeline-fragments.lib.yml",
#@ "repo_resource",
#@ "version_resource",
#@ "pipeline_tasks_resource",
#@ "release_task_image_config",
#@ "rust_task_image_config",
#@ "gh_release_resource",
#@ "nix_task_image_config",
#@ "fuzz_job",
#@ "fuzz_time_resource",
#@ "zenduty_notification_resource",
#@ "zenduty_resource_type",
#@ )
#@ def retry_task():
task: wait-and-retry
config:
platform: linux
image_resource: #@ release_task_image_config()
run:
path: sh
args:
- "-c"
- "sleep 5"
#@ end
groups:
- name: es-entity
jobs:
- check-code
- tests
- release
- set-dev-version
- fuzz
jobs:
#! Coverage-guided fuzzing (cargo-fuzz / libFuzzer), from galoy-concourse-shared.
#! Self-bootstrapping (first run fuzzes from scratch — no manual seed), corpus
#! persisted to GCS, Zenduty fires on crash. Default cadence: weekly Saturday
#! 06:00 UTC for 24h; override via fuzz_job(fuzz_seconds="...").
- #@ fuzz_job()
- name: check-code
serial: true
plan:
- in_parallel:
-
-
- task: check-code
config:
platform: linux
image_resource: #@ nix_task_image_config()
inputs:
- name: pipeline-tasks
- name: repo
caches:
- path: /nix-cache
run:
path: pipeline-tasks/ci/vendor/tasks/with-nix-cache.sh
args:
- sh
- -exc
- |
set -euo pipefail
cd repo
nix flake check
- name: tests
plan:
- in_parallel:
- get: repo
trigger: true
-
- task: tests
attempts: 2
config:
platform: linux
image_resource: #@ nix_task_image_config()
inputs:
- name: pipeline-tasks
- name: repo
caches:
- path: /nix-cache
run:
path: pipeline-tasks/ci/vendor/tasks/with-nix-cache.sh
args:
- sh
- -exc
- |
set -euo pipefail
cd repo
nix run .#nextest
- name: release
serial: true
plan:
- in_parallel:
- get: repo
passed:
- check-code
- tests
- get: pipeline-tasks
- get: version
- task: prep-release
config:
platform: linux
image_resource: #@ release_task_image_config()
inputs:
- name: pipeline-tasks
- name: repo
- name: version
outputs:
- name: version
- name: artifacts
run:
path: pipeline-tasks/ci/vendor/tasks/prep-release-src.sh
- task: update-repo
config:
platform: linux
image_resource: #@ rust_task_image_config()
inputs:
- name: artifacts
- name: pipeline-tasks
- name: repo
- name: version
outputs:
- name: repo
run:
path: pipeline-tasks/ci/tasks/update-repo.sh
- task: publish-to-crates
config:
image_resource: #@ rust_task_image_config()
platform: linux
inputs:
- name: version
- name: pipeline-tasks
- name: repo
params:
CRATES_API_TOKEN: #@ data.values.crates_api_token
caches:
- path: cargo-home
- path: cargo-target-dir
run:
path: pipeline-tasks/ci/tasks/publish-to-crates.sh
- put: repo
attempts: 3
params:
tag: artifacts/gh-release-tag
repository: repo
merge: true
on_failure: #@ retry_task()
- put: gh-release
params:
name: artifacts/gh-release-name
tag: artifacts/gh-release-tag
body: artifacts/gh-release-notes.md
- put: version
attempts: 3
params:
file: version/version
on_failure: #@ retry_task()
- name: set-dev-version
plan:
- in_parallel:
-
-
- get: version
trigger: true
params:
passed:
- task: set-dev-version
config:
image_resource: #@ rust_task_image_config()
platform: linux
inputs:
- name: version
- name: repo
- name: pipeline-tasks
outputs:
- name: repo
run:
path: pipeline-tasks/ci/tasks/set-dev-version.sh
params:
BRANCH: #@ data.values.git_branch
- put: repo
params:
repository: repo
rebase: true
resources:
- #@ repo_resource(True)
- #@ gh_release_resource()
- #@ pipeline_tasks_resource()
- #@ version_resource()
- #@ fuzz_time_resource()
- #@ zenduty_notification_resource()
resource_types:
- #@ zenduty_resource_type()