github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/contrib/cirrus/CIModes.md (about) 1 The following is a list (incomplete) of the primary contexts and runtime 2 "modes" supported by podman CI. Note that there may be additional checks 3 done regarding "skipping work" in the `runner.sh` script. This document 4 only details the controls at the `.cirrus.yml` level. 5 6 ## Visualization 7 8 The relationship between tasks can be incredibly hard to understand by 9 staring at the YAML. 10 [A tool exists](https://github.com/containers/automation/tree/main/cirrus-task-map) 11 for producing a graph (flow-chart) of the `.cirrus.yml` file. A (possibly 12 outdated) example of it's output can be seen below: 13 14  15 16 ## Implementation notes 17 18 + The `skip` conditional should never be used for tasks. 19 While it's arguably easier to read that `only_if`, it leads to a cluttered 20 status output that's harder to page through when reviewing PRs. As opposed 21 to `only_if` which will bypass creation of the task (at runtime) completely. 22 Also, by sticking to one conditional style, it's easer to re-use the YAML 23 statements across multiple tasks. 24 25 + The only variables which can be used as part of conditions are defined by 26 Cirrus-CI. 27 [The list is documented](https://cirrus-ci.org/guide/writing-tasks/#environment-variables). Reference to any variables defined in YAML will **not** behave how 28 you expect, don't use them! 29 30 * Somme Cirrus-CI defined variables contain non-empty values outside their 31 obvious context. For example, when running for a PR a task will have 32 `$CIRRUS_BRANCH` set to `pull/<number>`. 33 34 * Conditions which use positive or negative regular-expressions have several 35 "flags" set: "Multi-line" and "Case-insensitive". 36 37 ## Testing 38 39 Executing most of the modes can be mocked by forcing values for (otherwise) 40 Cirrus-CI defined variables. For example `$CIRRUS_TAG`. As of the publishing 41 of this document, it's not possible to override the behavior of `$CIRRUS_PR`. 42 43 ## Cirrus Task contexts and runtime modes 44 45 ### Intended general PR Tasks (*italic*: matrix) 46 + ext_svc_check 47 + automation 48 + *build* 49 + validate 50 + bindings 51 + swagger 52 + consistency 53 + *alt_build* 54 + osx_alt_build 55 + docker-py_test 56 + *unit_test* 57 + apiv2_test 58 + *compose_test* 59 + *local_integration_test* 60 + *remote_integration_test* 61 + *container_integration_test* 62 + *rootless_integration_test* 63 + *local_system_test* 64 + *remote_system_test* 65 + *rootless_remote_system_test* 66 + *buildah_bud_test* 67 + *rootless_system_test* 68 + rootless_gitlab_test 69 + *upgrade_test* 70 + meta 71 + success 72 + artifacts 73 74 ### Intended for PR w/ "release" or "bump" in title: 75 + (All the general PR tasks above) 76 + release_test 77 78 ### Intended `[CI:DOCS]` PR Tasks: 79 + ext_svc_check 80 + automation 81 + *build* 82 + validate 83 + swagger 84 + consistency 85 + meta 86 + success 87 88 ### Intend `[CI:BUILD]` PR Tasks: 89 + ext_svc_check 90 + automation 91 + *build* 92 + validate 93 + consistency 94 + *alt_build* 95 + osx_alt_build 96 + test_image_build 97 + meta 98 + success 99 + artifacts 100 101 ### Intended Branch tasks (and Cirrus-cron jobs, except "multiarch"): 102 + ext_svc_check 103 + *build* 104 + swagger 105 + *alt_build* 106 + osx_alt_build 107 + *local_system_test* 108 + *remote_system_test* 109 + *rootless_remote_system_test* 110 + *rootless_system_test* 111 + meta 112 + success 113 + artifacts 114 115 ### Intended for "multiarch" Cirrus-Cron (always a branch): 116 + ext_svc_check 117 + image_build 118 + meta 119 + success 120 121 ### Intended for new Tag tasks: 122 + *build* 123 + swagger 124 + *alt_build* 125 + osx_alt_build 126 + meta 127 + success 128 + artifacts 129 + release