Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for packer 1.5.0 and hcl2 #11

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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