packer-cn/command/test-fixtures
Wilken Rivera f672f5bd9b command/validate: Add support for HCL2 configuration files
* Update validate command to use FixConfig for checking against known
fixers
* Update validation command flag docs
* Add ConfigFixer method to PackerHandler Interface
* Implement ConfigFixer interface in PackerConfig
* Remove all stdout messaging (i.e calls to c.Ui.Say) in the validate
command. The command will only display hcl.Diagnotic messaging when there is an error or warning.

HCL2 Configs
```
⇶  packer validate docker_centos_shell_provisioner.pkr.hcl

```

JSON Configs
```
⇶  packer validate vmware-iso_ubuntu_minimal/vmware-iso_ubuntu_minimal.json
Error: Failed to prepare build: "vmware-iso"

1 error occurred:
        * Deprecated configuration key: 'iso_checksum_type'. Please call `packer fix`
against your template to update your template to be compatable with the current
version of Packer. Visit https://www.packer.io/docs/commands/fix/ for more
detail.

Warning: Fixable configuration found.
You may need to run `packer fix` to get your build to run correctly.
See debug log for more information.

  map[string]interface{}{
        "builders": []interface{}{
                map[string]interface{}{
                        ... // 3 identical entries
                        "guest_os_type":     string("ubuntu-64"),
                        "http_directory":    string("http"),
-                       "iso_checksum":
string("946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2"),
+                       "iso_checksum":
string("sha256:946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2"),
-                       "iso_checksum_type": string("sha256"),
                        "iso_url":
string("http://old-releases.ubuntu.com/releases/14.04.1/ubuntu-14.04.1-server-amd64.iso"),
                        "shutdown_command":  string("echo 'vagrant' | sudo -S shutdown -P now"),
                        ... // 4 identical entries
                },
        },
  }
```
2020-06-05 14:24:39 -04:00
..
build-name-and-type HCL2: pass on builder type and name (#8956) 2020-04-09 11:14:37 +02:00
build-only Simplify testing template 2019-12-10 18:59:56 +01:00
build-variable-sharing Render variables one time on prepare method (#8727) 2020-02-13 17:35:23 +01:00
cleanup-script rename option to error-cleanup-privisoner, which I think is clearer 2019-09-25 13:43:29 -07:00
fix command/fix: validate resulting template [GH-2075] 2015-06-13 13:56:09 -04:00
fix-invalid command/fix: validate resulting template [GH-2075] 2015-06-13 13:56:09 -04:00
hcl-only-except teach HCL mode builds to honor -only and -except options (#8947) 2020-04-28 15:03:24 +02:00
parallel add tests for cancellation while building 2019-05-06 15:07:57 +02:00
timeout test provisionning timeout 2019-04-08 20:09:21 +02:00
validate command/validate: Add support for HCL2 configuration files 2020-06-05 14:24:39 -04:00
validate-invalid command/validate: Add support for HCL2 configuration files 2020-06-05 14:24:39 -04:00
var-arg packer console for HCL2 (#9359) 2020-06-05 17:23:54 +02:00