Revert "Set packer builder type with env variable" 95/66595/1
authorAnil Belur <abelur@linuxfoundation.org>
Sat, 23 Jan 2021 01:45:03 +0000 (11:45 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Sat, 23 Jan 2021 02:11:42 +0000 (12:11 +1000)
This reverts commit 8041971ef211709579f919bdeb9a77fef0a29433.

Based on the input provided on the Gihub packer issue
hard-coded for our parser to be able to decode the rest of the config
properly."

Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I52ef1448fc53b2b9777786994683fbd705a1f8ba

releasenotes/notes/set-packer-builder-type-with-env-var-for-docker-win-b50a519f95603e2a.yaml [deleted file]
templates/docker.json
templates/windows-builder.json

diff --git a/releasenotes/notes/set-packer-builder-type-with-env-var-for-docker-win-b50a519f95603e2a.yaml b/releasenotes/notes/set-packer-builder-type-with-env-var-for-docker-win-b50a519f95603e2a.yaml
deleted file mode 100644 (file)
index 433f4f1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
----
-fixes:
-  - |
-    Set packer builder type with environment variable
-
-    Using the -only CLI option for packer build does not work as expected.
-    The #CR 90dd675df482a8 (global-jjb) submitted with common-packer v0.7.0
-    fails to build packer jobs because of a bug in the packer build CLI.
-
-    The `-only` option packer build CLI does not set the cloud provider
-    name/type as per the documentation. The alternative is to use an environment
-    variable that is passed through the packer job and can be reference in the
-    packer templates.
-
-    The CR #66528 missed including the changes to additional templates.
-
-    Ref:
-    https://github.com/hashicorp/packer/issues/10495
index a6f78a7..2254dd2 100644 (file)
     "distro": null,
     "flavor": "v2-highcpu-1",
     "ssh_user": null,
-    "ssh_proxy_host": "",
-    "cloud_type": "{{env `PACKER_BUILDER`}}"
+    "ssh_proxy_host": ""
   },
   "builders": [
     {
-      "name": "{{user `cloud_type`}}",
+      "name": "openstack",
       "image_name": "ZZCI - {{user `distro`}} - docker - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
       "instance_name": "{{user `distro`}}-docker-{{uuid}}",
       "source_image_name": "{{user `base_image`}}",
-      "type": "{{user `cloud_type`}}",
+      "type": "openstack",
       "region": "{{user `cloud_region`}}",
       "networks": ["{{user `cloud_network`}}"],
       "user_data_file": "{{user `cloud_user_data`}}",
index 022a879..f0e5758 100644 (file)
     "vm_volume_size": "20",
     "vm_image_disk_format": "",
     "distro": null,
-    "flavor": "v2-highcpu-4",
-    "cloud_type": "{{env `PACKER_BUILDER`}}"
+    "flavor": "v2-highcpu-4"
   },
   "builders": [
     {
-      "name": "{{user `cloud_type`}}",
+      "name": "openstack",
       "image_name": "ZZCI - {{user `distro`}} - win-builder - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
       "instance_name": "{{user `distro`}}-win-builder-{{uuid}}",
       "source_image_name": "{{user `base_image`}}",
-      "type": "{{user `cloud_type`}}",
+      "type": "openstack",
       "region": "{{user `cloud_region`}}",
       "networks": ["{{user `cloud_network`}}"],
       "user_data_file": "{{user `cloud_user_data`}}",