66 # ### Global variables used for all tasks
77 # ###
88 # Overrides default location (/tmp/cirrus) for repo clone
9- CIRRUS_WORKING_DIR : " /var/tmp/go/src/github.com/containers/storage "
9+ CIRRUS_WORKING_DIR : " /var/tmp/go/src/github.com/containers/container-libs "
1010 # Shell used to execute all script commands
1111 CIRRUS_SHELL : " /bin/bash"
1212 # Automation script path relative to $CIRRUS_WORKING_DIR)
1616 CIRRUS_CLONE_DEPTH : 50
1717 DEST_BRANCH : " main"
1818 GOPATH : " /var/tmp/go"
19- SKOPEO_PATH : " /var/tmp/go/src/github.com/containers/skopeo"
2019 GOBIN : " ${GOPATH}/bin"
20+ GOCACHE : " ${GOPATH}/cache"
21+ SKOPEO_PATH : " /var/tmp/go/src/github.com/containers/skopeo"
2122 IMAGE_WORKING_DIR : " /var/tmp/go/src/github.com/containers/image"
2223
2324
@@ -63,7 +64,7 @@ timeout_in: 120m
6364gce_instance :
6465 image_project : " ${IMAGE_PROJECT}"
6566 zone : " us-central1-b" # Required by Cirrus for the time being
66- cpu : 2
67+ cpu : 4
6768 memory : " 4Gb"
6869 disk : 200
6970 image_name : " ${FEDORA_CACHE_IMAGE_NAME}"
@@ -89,7 +90,10 @@ storage_linux_testing: &linux_testing
8990storage_fedora_testing_task : &fedora_testing
9091 << : *linux_testing
9192 alias : storage_fedora_testing
92- skip : " !changesInclude('storage/**')"
93+ only_if : &only_if_storage >-
94+ $CIRRUS_PR == '' ||
95+ changesInclude('.cirrus.yml', 'go.work', 'go.work.sum') ||
96+ changesInclude('storage/**')
9397 name : &std_test_name "Storage: ${OS_NAME} ${TEST_DRIVER}"
9498 env :
9599 OS_NAME : " ${FEDORA_NAME}"
@@ -115,7 +119,7 @@ storage_debian_testing_task: &storage_debian_testing
115119 << : *linux_testing
116120 alias : storage_debian_testing
117121 name : *std_test_name
118- skip : " !changesInclude('storage/**') "
122+ only_if : *only_if_storage
119123 env :
120124 OS_NAME : " ${DEBIAN_NAME}"
121125 VM_IMAGE : " ${DEBIAN_CACHE_IMAGE_NAME}"
@@ -136,7 +140,7 @@ storage_debian_testing_task: &storage_debian_testing
136140storage_lint_task :
137141 alias : storage_lint
138142 name : " Storage: Lint"
139- skip : " !changesInclude('storage/**') "
143+ only_if : *only_if_storage
140144
141145 env :
142146 CIRRUS_WORKING_DIR : " /go/src/github.com/containers/storage"
@@ -186,11 +190,10 @@ images_timestamp_update_task:
186190image_validate_task :
187191 alias : image_validate
188192 name : " Image: Validate"
189- skip : " !changesInclude('storage/**', 'image/**')"
190- # The git-validation tool doesn't work well on branch or tag push,
191- # under Cirrus-CI, due to challenges obtaining the starting commit ID.
192- # Only do validation for PRs.
193- only_if : $CIRRUS_PR != ''
193+ only_if : &only_if_image >-
194+ $CIRRUS_PR == '' ||
195+ changesInclude('.cirrus.yml', 'go.work', 'go.work.sum') ||
196+ changesInclude('storage/**', 'image/**')
194197 gce_instance : &fedora_vm
195198 image_project : libpod-218412
196199 zone : " us-central1-f"
@@ -217,8 +220,7 @@ image_validate_task:
217220image_cross_task :
218221 alias : image_cross
219222 name : " Image: Cross"
220- skip : " !changesInclude('storage/**', 'image/**')"
221- only_if : ¬_docs $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*'
223+ only_if : *only_if_image
222224 gce_instance : *fedora_vm
223225 env :
224226 HOME : " /root" # default unset, needed by golangci-lint.
@@ -232,8 +234,7 @@ image_test_task:
232234 alias : image_test
233235 depends_on :
234236 - image_validate
235- only_if : *not_docs
236- skip : " !changesInclude('storage/**', 'image/**')"
237+ only_if : *only_if_image
237238 gce_instance : *fedora_vm
238239 env :
239240 HOME : " /root" # default unset, needed by golangci-lint.
@@ -267,8 +268,7 @@ image_test_task:
267268# ####
268269image_test_skopeo_task :
269270 alias : image_test_skopeo
270- only_if : *not_docs
271- skip : " !changesInclude('storage/**', 'image/**')"
271+ only_if : *only_if_image
272272 depends_on :
273273 - image_validate
274274 gce_instance : *fedora_vm
@@ -310,38 +310,18 @@ image_test_skopeo_task:
310310
311311common_testing_task :
312312 alias : common_testing
313- name : " Common: Test"
314- skip : " !changesInclude('storage/**', 'image/**', 'common/**')"
315- container :
316- image : " ${FEDORA_CONTAINER_FQIN}"
313+ name : " Common: Test"
317314 modules_cache :
318315 fingerprint_script : cat common/go.sum
319316 folder : $GOPATH/pkg/mod
320- build_script : |
321- cd common
322- make vendor
323317 test_script : |
324318 cd common
325319 make build
326320 make build-cross
327321 make test
328322
329- storage_vendor_task :
330- alias : storage_vendor
331- name : " Vendor"
332- container :
333- image : golang
334- modules_cache :
335- fingerprint_script : cat storage/go.sum
336- folder : $GOPATH/pkg/mod
337- build_script : |
338- cd storage
339- make vendor
340- test_script : |
341- cd storage
342-
343323storage_cross_task :
344- skip : " !changesInclude('storage/**') "
324+ only_if : *only_if_storage
345325 alias : storage_cross
346326 name : " Storage: Cross"
347327 container :
@@ -351,7 +331,7 @@ storage_cross_task:
351331 make cross
352332
353333storage_gofix_task :
354- skip : " !changesInclude('storage/**') "
334+ only_if : *only_if_storage
355335 alias : storage_gofix
356336 name : " Storage: gofix"
357337 container :
@@ -366,7 +346,7 @@ storage_gofix_task:
366346 git diff --diff-filter=M --exit-code -- . ":(exclude)*.crt" ":(exclude)*.key" ":(exclude)*.cert"
367347
368348storage_codespell_task :
369- skip : " !changesInclude('storage/**') "
349+ only_if : *only_if_storage
370350 alias : storage_codespell
371351 name : " Storage: codespell"
372352 container :
@@ -390,7 +370,6 @@ success_task:
390370 - storage_fedora_testing
391371 - storage_debian_testing
392372 - images_timestamp_update
393- - storage_vendor
394373 - storage_cross
395374 - storage_gofix
396375 - storage_codespell
0 commit comments