Skip to content

Commit

Permalink
Merge pull request #11 from unifio/dmi-packer-1.5.0-update-hcl2-provi…
Browse files Browse the repository at this point in the history
…sioner-sig-change-issue-

Adding support for packer 1.5.0 and hcl2
  • Loading branch information
disaac committed May 19, 2020
2 parents 7001b93 + 589cd3a commit b1da9c0
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ executors:
working_directory: ~/packer-provisioner-serverspec
golang:
docker:
- image: circleci/golang:1.13.1
- image: circleci/golang:1.13.8
working_directory: ~/packer-provisioner-serverspec
environment:
ALPINE_VERSION: '3.10'
Expand All @@ -16,7 +16,7 @@ executors:
- image: circleci/ruby:2.5.5
working_directory: ~/packer-provisioner-serverspec
environment:
PACKER_VERSION: '1.4.4'
PACKER_VERSION: '1.5.4'
HASHI_KEY_URL: 'https://keybase.io/hashicorp/key.asc'
jobs:
build_provisioner:
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,15 @@ A system-chosen port is used when `local_port` is missing or empty.
### sftp_command (optional)

(string) - The command to run on the machine being provisioned by Packer to handle the SFTP protocol that the plug-in will use to transfer files. The command should read and write on stdin and stdout, respectively. Defaults to `/usr/lib/sftp-server -e`.

Development
------------

Packer 1.5.4 Added hcl2 support. In order to autogenerate support for this. Anytime a change to the `Config` struct is made you need to do the following to build.

```bash
go install github.com/hashicorp/packer/cmd/mapstructure-to-hcl2
go generate ./serverspec/...
```

This will regenerate the `provisioner.hcl2spec.go` file.
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module github.com/unifio/packer-provisioner-serverspec

require (
github.com/hashicorp/packer v1.4.4
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5
github.com/hashicorp/hcl/v2 v2.3.0
github.com/hashicorp/packer v1.5.4
github.com/zclconf/go-cty v1.2.1
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad
)

replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
Expand Down
Loading

0 comments on commit b1da9c0

Please sign in to comment.