YaleUniversity / packer-plugin-goss

Goss Provisioner for Packer
MIT License
136 stars 45 forks source link

build procedure #24

Closed dominikborkowski closed 4 years ago

dominikborkowski commented 4 years ago

Hello, While I mentioned problems building the provisioner in another issue, I figured it may be good to create a separate one and document it. I'm wondering what the proper steps are, considering that the usual 'go get' fails to find hcldec:

~ # go version
go version go1.13.7 linux/amd64
~ # go get github.com/YaleUniversity/packer-provisioner-goss
package github.com/hashicorp/hcl/v2/hcldec: cannot find package "github.com/hashicorp/hcl/v2/hcldec" in any of:
    /usr/local/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOROOT)
    /go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOPATH)
~ # go build github.com/YaleUniversity/packer-provisioner-goss
/go/src/github.com/YaleUniversity/packer-provisioner-goss/packer-provisioner-goss.go:12:2: cannot find package "github.com/hashicorp/hcl/v2/hcldec" in any of:
    /usr/local/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOROOT)
    /go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOPATH)
go build $GOPATH/src/github.com/YaleUniversity/packer-provisioner-goss
/go/src/github.com/YaleUniversity/packer-provisioner-goss/packer-provisioner-goss.go:12:2: cannot find package "github.com/hashicorp/hcl/v2/hcldec" in any of:
    /usr/local/go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOROOT)
    /go/src/github.com/hashicorp/hcl/v2/hcldec (from $GOPATH)

However, the build executes if go is executed inside the source dir:

~ # cd $GOPATH/src/github.com/YaleUniversity/packer-provisioner-goss
/go/src/github.com/YaleUniversity/packer-provisioner-goss # go build
go: downloading github.com/hashicorp/packer v1.5.1
go: downloading github.com/hashicorp/hcl v1.0.0
[...]

Am I missing something obvious? Thanks!

fishnix commented 4 years ago

Hi - I added build instructions to the README. Let me know if that doesn't work. Thanks!