forked from podman-container-tools/container-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cirrus.yml
More file actions
338 lines (303 loc) · 11.7 KB
/
Copy path.cirrus.yml
File metadata and controls
338 lines (303 loc) · 11.7 KB
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
---
# Main collection of env. vars to set for all tasks and scripts.
env:
####
#### Global variables used for all tasks
####
# Overrides default location (/tmp/cirrus) for repo clone
CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/container-libs"
# Shell used to execute all script commands
CIRRUS_SHELL: "/bin/bash"
# Automation script path relative to $CIRRUS_WORKING_DIR)
SCRIPT_BASE: "./storage/contrib/cirrus"
IMAGE_SCRIPT_BASE: "./image/contrib/cirrus"
# No need to go crazy, but grab enough to cover most PRs
CIRRUS_CLONE_DEPTH: 50
DEST_BRANCH: "main"
GOPATH: "/var/tmp/go"
GOBIN: "${GOPATH}/bin"
GOCACHE: "${GOPATH}/cache"
SKOPEO_PATH: "/var/tmp/go/src/github.com/containers/skopeo"
IMAGE_WORKING_DIR: "/var/tmp/go/src/github.com/containers/image"
####
#### Cache-image names to test with (double-quotes around names are critical)
###
FEDORA_NAME: "fedora-42"
DEBIAN_NAME: "debian-13"
# GCE project where images live
IMAGE_PROJECT: "libpod-218412"
# VM Image built in containers/automation_images
# If you are updating IMAGE_SUFFIX: We are currently using rawhide for
# the containers_image_sequoia tests because the rust-podman-sequoia
# package is not available in earlier releases; once we update to a future
# Fedora release (or if the package is backported), switch back from Rawhide
# to the latest Fedora release.
IMAGE_SUFFIX: "c20250910t092246z-f42f41d13"
RAWHIDE_CACHE_IMAGE_NAME: "rawhide-${IMAGE_SUFFIX}"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}"
FEDORA_CONTAINER_FQIN: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}"
####
#### Command variables to help avoid duplication
####
# Command to prefix every output line with a timestamp
# (can't do inline awk script, Cirrus-CI or YAML mangles quoting)
_TIMESTAMP: 'awk --file ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk'
_DFCMD: 'df -lhTx tmpfs'
_RAUDITCMD: 'cat /var/log/audit/audit.log'
_UAUDITCMD: 'cat /var/log/kern.log'
_JOURNALCMD: 'journalctl -b'
gcp_credentials: ENCRYPTED[f448b0e5ed38a52ba93550305f9e38c9b0c03852b9fc3115930f231fc7124b7423e8c912b4d9e002cc34b3a7ac3c145b]
# Default timeout for each task
timeout_in: 20m
# Default VM to use unless set or modified by task
gce_instance:
image_project: "${IMAGE_PROJECT}"
zone: "us-central1-b" # Required by Cirrus for the time being
cpu: 4
memory: "4Gb"
disk: 200
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
storage_linux_testing: &linux_testing
gce_instance: # Only need to specify differences from defaults (above)
image_name: "${VM_IMAGE}"
# Go module cache that is shared for all tasks
modules_cache: &modules_cache
fingerprint_script: cat **/go.sum
folder: $GOPATH/pkg/mod
# Note the cache is populated the first time it is used with the given deps.
# But because each task might not download all he same deps force make vendor
# which downloads all deps for all modules. This is only run once when the
# cache is created so it should not slow things down much.
populate_script: make vendor
# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_and_test_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/build_and_test.sh |& ${_TIMESTAMP}'
always:
df_script: '${_DFCMD} || true'
rh_audit_log_script: '${_RAUDITCMD} || true'
debian_audit_log_script: '${_UAUDITCMD} || true'
journal_log_script: '${_JOURNALCMD} || true'
storage_fedora_testing_task:
<<: *linux_testing
alias: storage_fedora_testing
only_if: &only_if_storage >-
$CIRRUS_PR == '' ||
changesInclude('.cirrus.yml', 'go.work', 'go.work.sum') ||
changesInclude('storage/**')
name: &std_test_name "Storage: ${OS_NAME} ${TEST_DRIVER}"
env:
OS_NAME: "${FEDORA_NAME}"
VM_IMAGE: "${FEDORA_CACHE_IMAGE_NAME}"
# Not all $TEST_DRIVER combinations valid for all $VM_IMAGE types.
matrix: &test_matrix
- env:
TEST_DRIVER: "vfs"
- env:
TEST_DRIVER: "overlay"
- env:
TEST_DRIVER: "overlay-transient"
- env:
TEST_DRIVER: "fuse-overlay"
- env:
TEST_DRIVER: "fuse-overlay-whiteout"
- env:
TEST_DRIVER: "btrfs"
# aufs was dropped between 20.04 and 22.04, can't test it
storage_debian_testing_task:
<<: *linux_testing
alias: storage_debian_testing
name: *std_test_name
only_if: *only_if_storage
env:
OS_NAME: "${DEBIAN_NAME}"
VM_IMAGE: "${DEBIAN_CACHE_IMAGE_NAME}"
# /tmp is a tmpfs, and as of 2025-09-11 we are using Debian images with Linux 6.1, where tmpfs does not support extended attributes.
# That prevents testing various graph drivers; setting TMPDIR changes where graph driver tests place their roots.
TMPDIR: "/var/tmp"
# Not all $TEST_DRIVER combinations valid for all $VM_IMAGE types.
matrix:
- env:
TEST_DRIVER: "vfs"
- env:
TEST_DRIVER: "overlay"
- env:
TEST_DRIVER: "fuse-overlay"
- env:
TEST_DRIVER: "fuse-overlay-whiteout"
- env:
TEST_DRIVER: "btrfs"
# Update metadata on VM images referenced by this repository state
images_timestamp_update_task:
alias: images_timestamp_update
name: "VM Images Timestamp Update"
container:
image: "quay.io/libpod/imgts:latest"
cpu: 1
memory: 1
env:
# Space-separated list of images used by this repository state
IMGNAMES: |-
${FEDORA_CACHE_IMAGE_NAME}
${DEBIAN_CACHE_IMAGE_NAME}
${RAWHIDE_CACHE_IMAGE_NAME}
BUILDID: "${CIRRUS_BUILD_ID}"
REPOREF: "${CIRRUS_CHANGE_IN_REPO}"
GCPJSON: ENCRYPTED[84d8f13981b019af7dfffbe13129ed035aa09ac167c55f2b4ebaccc4f91e8fca0b9c805e2bcf8f18da5b964b35c68203]
GCPNAME: ENCRYPTED[abc17b496b2a96dbf232a97e95a3696e71241f6addc82815ee230fcb67ce2908d4a572f13203cc5797ec24176ea40301]
GCPPROJECT: ENCRYPTED[dc578f8953d01e33fe6b329886b8b088c7a909246e169e640d621ac3f7f0ac251ea4f41353e162b1e5e6586cfb01520d]
CIRRUS_CLONE_DEPTH: 1 # source not used
script: '/usr/local/bin/entrypoint.sh |& ${_TIMESTAMP}'
image_cross_task:
alias: image_cross
name: "Image: Cross"
only_if: &only_if_image >-
$CIRRUS_PR == '' ||
changesInclude('.cirrus.yml', 'go.work', 'go.work.sum') ||
changesInclude('storage/**', 'image/**')
gce_instance: &fedora_vm
image_project: libpod-218412
zone: "us-central1-f"
cpu: 2
memory: "4Gb"
# Required to be 200gig, do not modify - has i/o performance impact
# according to gcloud CLI tool warning messages.
disk: 200
# Eventually, hard-code FEDORA_CACHE_IMAGE_NAME here again and remove the
# VM_IMAGE_NAME parameter.
image_name: ${VM_IMAGE_NAME}
modules_cache: *modules_cache
env:
HOME: "/root" # default unset, needed by golangci-lint.
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
script: |
cd image
make cross
image_test_task:
alias: image_test
only_if: *only_if_image
gce_instance: *fedora_vm
modules_cache: *modules_cache
env:
HOME: "/root" # default unset, needed by golangci-lint.
GOSRC: "${CIRRUS_WORKING_DIR}/image"
GOPATH: "/var/tmp/go"
# Required for consistency with containers/skopeo CI
matrix:
- name: "Image: Test"
env:
BUILDTAGS: ''
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
- name: "Image: Test w/ opengpg"
env:
BUILDTAGS: &withopengpg 'containers_image_openpgp'
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
- name: "Test w/ Sequoia (currently Rawhide)"
env:
BUILDTAGS: &withsequoia 'containers_image_sequoia'
VM_IMAGE_NAME: ${RAWHIDE_CACHE_IMAGE_NAME}
script: |
cd image
ls -l ${CIRRUS_WORKING_DIR}
echo "${GOPATH}"
${CIRRUS_WORKING_DIR}/${IMAGE_SCRIPT_BASE}/runner.sh image_tests
#####
##### NOTE: This task is subtantially duplicated in the containers/skopeo
##### repository's `.cirrus.yml`. Changes made here should be fully merged
##### prior to being manually duplicated and maintained in containers/skopeo.
#####
image_test_skopeo_task:
alias: image_test_skopeo
only_if: *only_if_image
gce_instance: *fedora_vm
env:
HOME: "/root" # default unset, needed by golangci-lint.
GOSRC: "${CIRRUS_WORKING_DIR}"
GOPATH: "/var/tmp/go"
SKOPEO_CI_BRANCH: "main"
SCRIPT_BASE: "./contrib/cirrus"
# Built along with the standard PR-based workflow in c/automation_images
SKOPEO_CIDEV_CONTAINER_FQIN: "quay.io/libpod/skopeo_cidev:${IMAGE_SUFFIX}"
modules_cache: *modules_cache
matrix:
- name: "Image: Skopeo Test"
env:
BUILDTAGS: ''
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
- name: "Image: Skopeo Test w/ opengpg"
env:
BUILDTAGS: *withopengpg
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
- name: "Skopeo Test w/ Sequoia (currently Rawhide)"
env:
BUILDTAGS: *withsequoia
VM_IMAGE_NAME: ${RAWHIDE_CACHE_IMAGE_NAME}
setup_script: >-
"${CIRRUS_WORKING_DIR}/${IMAGE_SCRIPT_BASE}/runner.sh" setup
vendor_script: >-
"${SKOPEO_PATH}/contrib/cirrus/runner.sh" vendor
build_script: >-
"${SKOPEO_PATH}/contrib/cirrus/runner.sh" build
unit_script: >-
"${SKOPEO_PATH}/contrib/cirrus/runner.sh" unit
integration_script: >-
"${SKOPEO_PATH}/contrib/cirrus/runner.sh" integration
system_script: >
"${SKOPEO_PATH}/contrib/cirrus/runner.sh" system
common_testing_task:
alias: common_testing
name: "Common: Test"
modules_cache: *modules_cache
env:
NETAVARK_BINARY: "/usr/libexec/podman/netavark"
test_script: |
cd common
make build
make build-cross
make test
storage_cross_task:
only_if: *only_if_storage
alias: storage_cross
name: "Storage: Cross"
container:
image: golang:1.24
modules_cache: *modules_cache
build_script: |
cd storage
make cross
storage_gofix_task:
only_if: *only_if_storage
alias: storage_gofix
name: "Storage: gofix"
container:
image: golang:1.24
build_script: |
cd storage
go fix ./...
test_script: |
# The git diff complains about broken symlinks in some test files.
# We therefore filter-out these files, since they are not changed by
# gofix anyway.
git diff --diff-filter=M --exit-code -- . ":(exclude)*.crt" ":(exclude)*.key" ":(exclude)*.cert"
# Status aggregator for all tests. This task simply ensures a defined
# set of tasks all passed, and allows confirming that based on the status
# of this task.
success_task:
alias: success
# N/B: The prow merge-bot (tide) is sensitized to this exact name, DO NOT CHANGE IT.
# Ref: https://github.com/openshift/release/pull/49820
name: "Total Success"
depends_on:
- storage_fedora_testing
- storage_debian_testing
- images_timestamp_update
- storage_cross
- storage_gofix
- common_testing
- image_cross
- image_test
- image_test_skopeo
container:
image: golang:1.24
clone_script: 'mkdir -p "$CIRRUS_WORKING_DIR"' # Source code not needed
script: /bin/true