summaryrefslogtreecommitdiff
path: root/contrib/cirrus/packer/libpod_images.yml
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-01-21 08:48:15 -0500
committerChris Evich <cevich@redhat.com>2019-01-30 08:26:48 -0500
commit8ca6706be0fff7136ba118914f6dbe3459c8f831 (patch)
tree9b274758cb11a5e0b7184ff3376b9ec829fe431c /contrib/cirrus/packer/libpod_images.yml
parentb71088a01e1e43b87214aaca87c73865fa3b990e (diff)
downloadpodman-8ca6706be0fff7136ba118914f6dbe3459c8f831.tar.gz
podman-8ca6706be0fff7136ba118914f6dbe3459c8f831.tar.bz2
podman-8ca6706be0fff7136ba118914f6dbe3459c8f831.zip
Cirrus: Add RHEL-7 testing
Add necessary tweaks to base-image build/import process so that image can successfully boot with networking enabled. Build the base image and update ``.cirrus.yml`` accordingly. Also make a minor improvement to cache-image building to help save space in GCP image storage. Namely, instead of storing every produced image, export them into google storage buckets w/ life-cycle enabled. For production use, they may be converted back into GCE images, otherwise they will expire after a time. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/packer/libpod_images.yml')
-rw-r--r--contrib/cirrus/packer/libpod_images.yml13
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/cirrus/packer/libpod_images.yml b/contrib/cirrus/packer/libpod_images.yml
index d31c11a8d..30ad0723a 100644
--- a/contrib/cirrus/packer/libpod_images.yml
+++ b/contrib/cirrus/packer/libpod_images.yml
@@ -29,6 +29,10 @@ variables:
SERVICE_ACCOUNT: '{{env `SERVICE_ACCOUNT`}}'
GOOGLE_APPLICATION_CREDENTIALS: '{{env `GOOGLE_APPLICATION_CREDENTIALS`}}'
+ # Used to separate images produced during PR testing from those
+ # produced from post-merge testing. Must be empty for PR testing.
+ POST_MERGE_BUCKET_SUFFIX: ''
+
# Don't leak sensitive values in error messages / output
sensitive-variables:
- 'GCE_SSH_USERNAME'
@@ -84,13 +88,18 @@ provisioners:
- type: 'shell'
script: '{{user `GOSRC`}}/{{user `PACKER_BASE`}}/{{split build_name "-" 0}}_setup.sh'
environment_vars:
- - 'SCRIPT_BASE={{user `SCRIPT_BASE`}}'
+ - 'GOSRC=/tmp/libpod'
- 'CNI_COMMIT={{user `CNI_COMMIT`}}'
- 'FEDORA_CNI_COMMIT={{user `FEDORA_CNI_COMMIT`}}'
- 'CRIO_COMMIT={{user `CRIO_COMMIT`}}'
- 'CRIU_COMMIT={{user `CRIU_COMMIT`}}'
- 'RUNC_COMMIT={{user `RUNC_COMMIT`}}'
+ - 'SCRIPT_BASE={{user `SCRIPT_BASE`}}'
- 'RHSM_COMMAND={{user `RHSM_COMMAND`}}'
post-processors:
- - - type: 'manifest'
+ # Store VM disk in GCP storage, where it will expire based on a defined
+ # lifecycle. This prevents GCE from filling with disused images.
+ - - type: 'googlecompute-export'
+ paths: ['gs://packer-import{{user `POST_MERGE_BUCKET_SUFFIX`}}/{{build_name}}{{user `BUILT_IMAGE_SUFFIX`}}.tar.gz']
+ - type: 'manifest' # writes packer-manifest.json