github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/contrib/cirrus/packer/libpod_images.yml (about) 1 --- 2 3 # All of these are required 4 variables: 5 BUILT_IMAGE_SUFFIX: '{{env `BUILT_IMAGE_SUFFIX`}}' 6 GOSRC: '{{env `GOSRC`}}' 7 PACKER_BASE: '{{env `PACKER_BASE`}}' 8 SCRIPT_BASE: '{{env `SCRIPT_BASE`}}' 9 10 # Base-image names are required. Using image family-names breaks parallelism 11 UBUNTU_BASE_IMAGE: '{{env `UBUNTU_BASE_IMAGE`}}' 12 PRIOR_UBUNTU_BASE_IMAGE: '{{env `PRIOR_UBUNTU_BASE_IMAGE`}}' 13 FEDORA_BASE_IMAGE: '{{env `FEDORA_BASE_IMAGE`}}' 14 PRIOR_FEDORA_BASE_IMAGE: '{{env `PRIOR_FEDORA_BASE_IMAGE`}}' 15 16 # Protected credentials, decrypted by Cirrus at runtime 17 GCE_SSH_USERNAME: '{{env `GCE_SSH_USERNAME`}}' 18 GCP_PROJECT_ID: '{{env `GCP_PROJECT_ID`}}' 19 SERVICE_ACCOUNT: '{{env `SERVICE_ACCOUNT`}}' 20 GOOGLE_APPLICATION_CREDENTIALS: '{{env `GOOGLE_APPLICATION_CREDENTIALS`}}' 21 22 # Don't leak sensitive values in error messages / output 23 sensitive-variables: 24 - 'GCE_SSH_USERNAME' 25 - 'GCP_PROJECT_ID' 26 - 'SERVICE_ACCOUNT' 27 28 # What images to produce in which cloud 29 builders: 30 # v----- is a YAML anchor, allows referencing this object by name (below) 31 - &gce_hosted_image 32 name: 'ubuntu-19' 33 type: 'googlecompute' 34 image_name: '{{build_name}}{{user `BUILT_IMAGE_SUFFIX`}}' 35 image_family: '{{build_name}}-cache' 36 source_image: '{{user `UBUNTU_BASE_IMAGE`}}' # precedence over family 37 source_image_family: 'ubuntu-base' # for ref. only 38 disk_size: 20 # REQUIRED: Runtime allocation > this value 39 project_id: '{{user `GCP_PROJECT_ID`}}' 40 service_account_email: '{{user `SERVICE_ACCOUNT`}}' 41 communicator: 'ssh' 42 ssh_username: '{{user `GCE_SSH_USERNAME`}}' 43 ssh_pty: 'true' 44 # The only supported zone in Cirrus-CI, as of addition of this comment 45 zone: 'us-central1-a' 46 47 # v----- is a YAML alias, allows partial re-use of the anchor object 48 - <<: *gce_hosted_image 49 name: 'ubuntu-18' 50 source_image: '{{user `PRIOR_UBUNTU_BASE_IMAGE`}}' 51 source_image_family: 'prior-ubuntu-base' 52 53 - <<: *gce_hosted_image 54 name: 'fedora-31' 55 source_image: '{{user `FEDORA_BASE_IMAGE`}}' 56 source_image_family: 'fedora-base' 57 58 - <<: *gce_hosted_image 59 name: 'fedora-30' 60 source_image: '{{user `PRIOR_FEDORA_BASE_IMAGE`}}' 61 source_image_family: 'prior-fedora-base' 62 63 # The brains of the operation, making actual modifications to the base-image. 64 provisioners: 65 - type: 'file' 66 source: '{{user `GOSRC`}}' 67 destination: '/tmp/libpod' 68 69 - type: 'shell' 70 script: '{{user `GOSRC`}}/{{user `PACKER_BASE`}}/{{split build_name "-" 0}}_setup.sh' 71 environment_vars: 72 - 'PACKER_BUILDER_NAME={{build_name}}' 73 - 'GOSRC=/tmp/libpod' 74 - 'SCRIPT_BASE={{user `SCRIPT_BASE`}}' 75 76 post-processors: 77 - type: 'manifest' # writes packer-manifest.json