Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
Merged in bitbucket/TER-243_create-build-release-pipeline (pull reque…
Browse files Browse the repository at this point in the history
…st #19)

TER-243: Add goreleaser && update Bitbucket CI

Approved-by: Jordan Caussat <[email protected]>
Approved-by: Jérôme Respaut <[email protected]>
Approved-by: Burak Karamahmut <[email protected]>
  • Loading branch information
Jordan Caussat authored and Shr3ps committed Jul 31, 2018
2 parents eacfaae + dc682dd commit 6c0d918
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 8 deletions.
40 changes: 40 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
project_name: terraform-provider-cloud-deploy

builds:
- binary: "terraform-provider-cloud-deploy_{{.Tag}}"
goos:
- freebsd
- windows
- linux
- solaris
- openbsd
- darwin
goarch:
- amd64
- 386
- arm
ignore:
- goos: darwin
goarch: 386
- goos: solaris
goarch: 386
- goos: darwin
goarch: arm
- goos: openbsd
goarch: arm
- goos: windows
goarch: arm
- goos: solaris
goarch: arm

archive:
format: zip
files:
- none*

release:
draft: true

github:
owner: claranet
name: terraform-provider-cloud-deploy
17 changes: 9 additions & 8 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ pipelines:
default:
- step:
script:
- PACKAGE_PATH="${GOPATH}/src/cloud-deploy.io/${BITBUCKET_REPO_SLUG}"
- mkdir -pv "${PACKAGE_PATH}"
- tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}"
- cd "${PACKAGE_PATH}"
- go get github.com/kardianos/govendor
- make test
- make vendor-status
- make vet
- ./scripts/bitbucket-pipelines-default.sh

custom:
release:
- step:
caches:
- docker
script:
- ./scripts/bitbucket-pipelines-release.sh
10 changes: 10 additions & 0 deletions scripts/bitbucket-pipelines-default.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

PACKAGE_PATH="${GOPATH}/src/cloud-deploy.io/${BITBUCKET_REPO_SLUG}"
mkdir -pv "${PACKAGE_PATH}"
tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}"
cd "${PACKAGE_PATH}"
go get github.com/kardianos/govendor
make test
make vendor-status
make vet
8 changes: 8 additions & 0 deletions scripts/bitbucket-pipelines-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

PACKAGE_PATH="${GOPATH}/src/cloud-deploy.io/terraform-provider-cloud-deploy"
mkdir -pv "${PACKAGE_PATH}"
tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}"
cd "${PACKAGE_PATH}"
git ls-remote --heads --tags https://github.com/claranet/terraform-provider-cloud-deploy.git | grep -E "refs/(heads|tags)/${BITBUCKET_TAG}$"
docker run --rm goreleaser/goreleaser:v0.80

0 comments on commit 6c0d918

Please sign in to comment.