Skip to content

Commit

Permalink
Packer v1.4 updates
Browse files Browse the repository at this point in the history
Issue #7

* Created makefile for generating builds and releases leveraging gox to cross compile for all platforms.
* Updated serverspec definitions to no longer use deprecated options.
* Added a goreleaser yml for deployment of the versions from CI.
* Removed circleci.yml temporarily will add support for building with golang orb that deploys binaries on builds.
* Moved package source to sub directory in serverspec
* Updated Packer UI signatures and adapter usage. Leveraging Safe UI creation.
* Added `go mod vendor` to generator a committed vendored direcgory with project.
* Added support for development outside GOPATH by supplying go.mod.
## TODO:
* Add support for executing `rake` with bundler to avoid issues selecting correct gems in UAT.
* Add CircleCI build and goreleaser deployment of binaries to repository.
  • Loading branch information
disaac committed Sep 6, 2019
1 parent ea49844 commit 6e27b95
Show file tree
Hide file tree
Showing 1,738 changed files with 729,907 additions and 4,249 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
packer-provisioner-*
packer-builder-*
*.log
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
dist/config.yaml
34 changes: 34 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Configuration for https://goreleaser.com/
project_name: packer-provisioner-serverspec

builds:
- id: packer-provisioner-serverspec
binary: packer-provisioner-serverspec
main: main.go
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- arm
- arm64
- 386
env:
- CGO_ENABLED=0

archives:
- id: packer-provisioner-serverspec
builds: [ packer-provisioner-serverspec ]
format_overrides:
- goos: windows
format: zip
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- none*
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"go.inferGopath": false
}
99 changes: 0 additions & 99 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
default: build

prepare:
go get ./...

test: prepare
go test ./...

fmt:
go fmt .

build: fmt test
go build -v

install: build
mkdir -p ~/.packer.d/plugins
install ./packer-provisioner-serverspec ~/.packer.d/plugins/

release: test
mkdir -p releases
go get github.com/mitchellh/gox
gox -osarch="darwin/amd64 darwin/386 linux/amd64 linux/386 windows/amd64 windows/386" --output 'dist/{{.OS}}_{{.Arch}}/{{.Dir}}'
zip -j releases/packer-provisioner-serverspec_darwin_386.zip dist/darwin_386/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_darwin_amd64.zip dist/darwin_amd64/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_linux_386.zip dist/linux_386/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_linux_amd64.zip dist/linux_amd64/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_windows_386.zip dist/windows_386/packer-provisioner-serverspec.exe
zip -j releases/packer-provisioner-serverspec_windows_amd64.zip dist/windows_amd64/packer-provisioner-serverspec.exe

clean:
rm -rf dist/
rm -f releases/*.zip

.PHONY: default prepare test build install release clean
146 changes: 0 additions & 146 deletions adapter_test.go

This file was deleted.

31 changes: 0 additions & 31 deletions circle.yml

This file was deleted.

8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/unifio/packer-provisioner-serverspec

require (
github.com/hashicorp/packer v1.4.3
golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d
)

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

0 comments on commit 6e27b95

Please sign in to comment.