github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/.cirrus.yml (about) 1 --- 2 3 # Only github users with write-access can define or use encrypted variables 4 # This credential represents a service account with access to manage both VMs 5 # and storage. 6 gcp_credentials: ENCRYPTED[885c6e4297dd8d6f67593c42b810353af0c505a7a670e2c6fd830c56e86bbb2debcc3c18f942d0d46ab36b63521061d4] 7 8 # Default timeout for each task 9 timeout_in: 120m 10 11 # Main collection of env. vars to set for all tasks and scripts. 12 env: 13 #### 14 #### Global variables used for all tasks 15 #### 16 # Name of the ultimate destination branch for this CI run, PR or post-merge. 17 DEST_BRANCH: "v1.9" 18 # Overrides default location (/tmp/cirrus) for repo clone 19 GOPATH: "/var/tmp/go" 20 GOBIN: "${GOPATH}/bin" 21 GOSRC: "/var/tmp/go/src/github.com/containers/libpod" 22 CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/libpod" 23 # The default is 'sh' if unspecified 24 CIRRUS_SHELL: "/bin/bash" 25 # Save a little typing (path relative to $CIRRUS_WORKING_DIR) 26 SCRIPT_BASE: "./contrib/cirrus" 27 # Command to prefix output lines with timing information 28 # (can't do inline awk script, Cirrus-CI or YAML mangles quoting) 29 TIMESTAMP: "awk --file ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk" 30 31 # HTMLify ginkgo and bats logs 32 LOGFORMAT: "${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/logformatter" 33 34 #### 35 #### Cache-image names to test with (double-quotes around names are critical) 36 ### 37 FEDORA_NAME: "fedora-31" 38 PRIOR_FEDORA_NAME: "fedora-30" 39 UBUNTU_NAME: "ubuntu-19" 40 PRIOR_UBUNTU_NAME: "ubuntu-18" 41 42 _BUILT_IMAGE_SUFFIX: "libpod-6465271544152064" 43 FEDORA_CACHE_IMAGE_NAME: "${FEDORA_NAME}-${_BUILT_IMAGE_SUFFIX}" 44 PRIOR_FEDORA_CACHE_IMAGE_NAME: "${PRIOR_FEDORA_NAME}-${_BUILT_IMAGE_SUFFIX}" 45 UBUNTU_CACHE_IMAGE_NAME: "${UBUNTU_NAME}-${_BUILT_IMAGE_SUFFIX}" 46 PRIOR_UBUNTU_CACHE_IMAGE_NAME: "${PRIOR_UBUNTU_NAME}-${_BUILT_IMAGE_SUFFIX}" 47 48 #### 49 #### Variables for composing new cache-images (used in PR testing) from 50 #### base-images (pre-existing in GCE) 51 #### 52 BUILT_IMAGE_SUFFIX: "-${CIRRUS_REPO_NAME}-${CIRRUS_BUILD_ID}" 53 # Special image w/ nested-libvirt + tools for creating new cache and base images 54 IMAGE_BUILDER_CACHE_IMAGE_NAME: "image-builder-image-1541772081" 55 56 #### 57 #### Default to NOT operating in any special-case testing mode 58 #### 59 SPECIALMODE: "none" # don't do anything special 60 TEST_REMOTE_CLIENT: 'false' # don't test remote client by default 61 ADD_SECOND_PARTITION: 'false' # will certainly fail inside containers 62 MOD_LIBPOD_CONF: 'true' # Update libpod.conf runtime if required by OS environment 63 64 #### 65 #### Credentials and other secret-sauces, decrypted at runtime when authorized. 66 #### 67 # Freenode IRC credentials for posting status messages 68 IRCID: disabled 69 # Needed to build GCE images, within a GCE VM 70 SERVICE_ACCOUNT: ENCRYPTED[a28959877b2c9c36f151781b0a05407218cda646c7d047fc556e42f55e097e897ab63ee78369dae141dcf0b46a9d0cdd] 71 # User ID for cirrus to ssh into VMs 72 GCE_SSH_USERNAME: cirrus-ci 73 # Name where this repositories cloud resources are located 74 GCP_PROJECT_ID: libpod-218412 75 RELEASE_GCPJSON: disabled 76 RELEASE_GCPNAME: disabled 77 RELEASE_GCPROJECT: disabled 78 79 80 81 # Default VM to use unless set or modified by task 82 gce_instance: 83 image_project: "libpod-218412" 84 zone: "us-central1-a" # Required by Cirrus for the time being 85 cpu: 2 86 memory: "4Gb" 87 disk: 200 88 # A matrix could be used here, for now just one VM 89 image_name: "${FEDORA_CACHE_IMAGE_NAME}" 90 91 92 # Every *_task runs in parallel in separate VMsd. The name prefix only for reference 93 # in WebUI, and will be followed by matrix details. This task gates all others with 94 # quick format, lint, and unit tests on the standard platform. 95 gating_task: 96 97 # Only run this on PRs, never during post-merge testing (for speed). 98 only_if: $CIRRUS_BRANCH != $DEST_BRANCH 99 100 env: 101 CIRRUS_WORKING_DIR: "/usr/src/libpod" 102 SRCPATH: "$CIRRUS_WORKING_DIR" 103 104 # Runs within Cirrus's "community cluster" 105 container: 106 # Note: Image has dual purpose, see contrib/gate/README.md 107 # The entrypoint.sh script ensures a prestine copy of $SRCPATH is 108 # available at $GOSRC before executing make instructions. 109 image: "quay.io/libpod/gate:v1.9" 110 cpu: 8 111 memory: 12 112 113 timeout_in: 20m 114 115 # Custom cloning is required to satisfy lint/validation needs 116 clone_script: | 117 git clone --recursive --branch=$DEST_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR 118 git remote update origin 119 if [[ -n "$CIRRUS_PR" ]]; then # running for a PR 120 git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR 121 git checkout pull/$CIRRUS_PR 122 fi 123 git reset --hard $CIRRUS_CHANGE_IN_REPO 124 125 # Don't bother going further if something is down 126 networking_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/networking.sh' 127 128 gate_script: 129 # N/B: entrypoint.sh resets $GOSRC (same as make clean) 130 - '/usr/local/bin/entrypoint.sh install.tools |& ${TIMESTAMP}' 131 - '/usr/local/bin/entrypoint.sh validate |& ${TIMESTAMP}' 132 133 # This task builds Podman with different buildtags to ensure the build does 134 # not break. It also verifies all sub-commands have man pages. 135 build_script: 136 - '/usr/local/bin/entrypoint.sh podman |& ${TIMESTAMP}' 137 - 'cd $GOSRC && ./hack/podman-commands.sh |& ${TIMESTAMP}' 138 # N/B: need 'clean' so some committed files are re-generated. 139 - '/usr/local/bin/entrypoint.sh clean podman-remote |& ${TIMESTAMP}' 140 - '/usr/local/bin/entrypoint.sh clean podman xref_helpmsgs_manpages BUILDTAGS="exclude_graphdriver_devicemapper selinux seccomp" |& ${TIMESTAMP}' 141 - '/usr/local/bin/entrypoint.sh local-cross |& ${TIMESTAMP}' 142 143 # Verify some aspects of ci/related scripts 144 ci_script: 145 - '${GOSRC}/${SCRIPT_BASE}/lib.sh.t |& ${TIMESTAMP}' 146 - '/usr/local/bin/entrypoint.sh -C ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/packer test' 147 - '${GOSRC}/${SCRIPT_BASE}/cirrus_yaml_test.py |& ${TIMESTAMP}' 148 149 # Verify expected bash environment (-o pipefail) 150 pipefail_enabledscript: 'if /bin/false | /bin/true; then echo "pipefail fault" && exit 72; fi' 151 152 on_failure: 153 failed_branch_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_branch_failure.sh' 154 155 156 # Update metadata on VM images referenced by this repository state 157 meta_task: 158 159 container: 160 image: "quay.io/libpod/imgts:v1.9" # see contrib/imgts 161 cpu: 1 162 memory: 1 163 164 env: &meta_env_vars 165 # Space-separated list of images used by this repository state 166 IMGNAMES: >- 167 ${FEDORA_CACHE_IMAGE_NAME} 168 ${PRIOR_FEDORA_CACHE_IMAGE_NAME} 169 ${UBUNTU_CACHE_IMAGE_NAME} 170 ${PRIOR_UBUNTU_CACHE_IMAGE_NAME} 171 ${IMAGE_BUILDER_CACHE_IMAGE_NAME} 172 BUILDID: "${CIRRUS_BUILD_ID}" 173 REPOREF: "${CIRRUS_CHANGE_IN_REPO}" 174 GCPJSON: ENCRYPTED[3a198350077849c8df14b723c0f4c9fece9ebe6408d35982e7adf2105a33f8e0e166ed3ed614875a0887e1af2b8775f4] 175 # needed for output-masking purposes 176 GCPNAME: ENCRYPTED[2f9738ef295a706f66a13891b40e8eaa92a89e0e87faf8bed66c41eca72bf76cfd190a6f2d0e8444c631fdf15ed32ef6] 177 GCPPROJECT: libpod-218412 178 179 timeout_in: 10m 180 181 # Cirrus-CI ignores entrypoint defined in image 182 script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/update_meta.sh |& ${TIMESTAMP}' 183 184 185 # Post message to IRC if everything passed PR testing 186 success_task: 187 188 # This task is a required-pass in github settings, 189 # it blocks PRs from merging if a depends_on task fails 190 only_if: $CIRRUS_BRANCH != $DEST_BRANCH 191 192 # ignores any dependent task conditions 193 depends_on: 194 - "gating" 195 - "meta" 196 197 env: 198 CIRRUS_WORKING_DIR: "/usr/src/libpod" 199 SRCPATH: "$CIRRUS_WORKING_DIR" 200 EPOCH_TEST_COMMIT: "${CIRRUS_BASE_SHA}" # repo clone missing this data 201 202 container: 203 # Note: Image has dual purpose, see contrib/gate/README.md 204 image: "quay.io/libpod/gate:v1.9" 205 cpu: 1 206 memory: 1 207 208 success_script: '/usr/local/bin/entrypoint.sh ./$SCRIPT_BASE/success.sh |& ${TIMESTAMP}'