summaryrefslogtreecommitdiff
path: root/contrib/cirrus/packer
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2018-10-08 09:06:10 -0400
committerChris Evich <cevich@redhat.com>2018-10-18 12:37:08 -0400
commit02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c (patch)
treeed03e5aad9042750fed9a6e062e2fabd5327cfd1 /contrib/cirrus/packer
parenta75a888640efcbecdf80caac3004957d6b0752ed (diff)
downloadpodman-02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c.tar.gz
podman-02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c.tar.bz2
podman-02bc3c9962f8d80a239bba1a6c8bd97d1c5ba44c.zip
Fix Cirrus/Packer VM image building
An invalid GCE value is being passed to packer, preventing it from building VM images. Fix this, and centralize the definition of the image name suffix by setting it at ``setup_environment.sh`` call-time, rather encoding inside packer's `libpod_images.json`. This makes the value available for use by other scripts. Also, switch the unique component of the name, to be based on the commit-sha being tested. This will improve traceability, since the git history is more permanent than the `CIRRUS_BUILD_ID` env. var. The later is subject to log-rotation, destroying evidence of the images source state. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/packer')
-rw-r--r--contrib/cirrus/packer/libpod_images.json10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/cirrus/packer/libpod_images.json b/contrib/cirrus/packer/libpod_images.json
index 82a41ca25..ec2641282 100644
--- a/contrib/cirrus/packer/libpod_images.json
+++ b/contrib/cirrus/packer/libpod_images.json
@@ -15,7 +15,7 @@
"SERVICE_ACCOUNT": "{{env `SERVICE_ACCOUNT`}}",
"GCP_PROJECT_ID": "{{env `GCP_PROJECT_ID`}}",
- "CIRRUS_BUILD_ID": "{{env `CIRRUS_BUILD_ID`}}",
+ "BUILT_IMAGE_SUFFIX": "{{env `BUILT_IMAGE_SUFFIX`}}",
"GCE_SSH_USERNAME": "{{env `GCE_SSH_USERNAME`}}",
"RHSM_COMMAND": "{{env `RHSM_COMMAND`}}"
},
@@ -29,7 +29,7 @@
"project_id": "{{user `GCP_PROJECT_ID`}}",
"zone": "us-central1-a",
"source_image": "{{user `RHEL_BASE_IMAGE`}}",
- "image_name": "{{user `RHEL_BASE_IMAGE`}}-libpod-{{user `CIRRUS_BUILD_ID`}}",
+ "image_name": "{{user `RHEL_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
"image_family": "{{user `RHEL_BASE_IMAGE`}}-libpod",
"service_account_email": "{{user `SERVICE_ACCOUNT`}}",
"communicator": "ssh",
@@ -41,7 +41,7 @@
"project_id": "{{user `GCP_PROJECT_ID`}}",
"zone": "us-central1-a",
"source_image": "{{user `CENTOS_BASE_IMAGE`}}",
- "image_name": "{{user `CENTOS_BASE_IMAGE`}}-libpod-{{user `CIRRUS_BUILD_ID`}}",
+ "image_name": "{{user `CENTOS_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
"image_family": "{{user `CENTOS_BASE_IMAGE`}}-libpod",
"service_account_email": "{{user `SERVICE_ACCOUNT`}}",
"communicator": "ssh",
@@ -53,7 +53,7 @@
"project_id": "{{user `GCP_PROJECT_ID`}}",
"zone": "us-central1-a",
"source_image": "{{user `FEDORA_BASE_IMAGE`}}",
- "image_name": "{{user `FEDORA_BASE_IMAGE`}}-libpod-{{user `CIRRUS_BUILD_ID`}}",
+ "image_name": "{{user `FEDORA_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
"image_family": "{{user `FEDORA_BASE_IMAGE`}}-libpod",
"service_account_email": "{{user `SERVICE_ACCOUNT`}}",
"communicator": "ssh",
@@ -65,7 +65,7 @@
"project_id": "{{user `GCP_PROJECT_ID`}}",
"zone": "us-central1-a",
"source_image": "{{user `UBUNTU_BASE_IMAGE`}}",
- "image_name": "{{user `UBUNTU_BASE_IMAGE`}}-libpod-{{user `CIRRUS_BUILD_ID`}}",
+ "image_name": "{{user `UBUNTU_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
"image_family": "{{user `UBUNTU_BASE_IMAGE`}}-libpod",
"service_account_email": "{{user `SERVICE_ACCOUNT`}}",
"communicator": "ssh",