diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 71e935d93f9aef1c793fffe92afe874145356e16..0c55e0c35c49f4fcb76cf84c4abaa3565928b9a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,8 @@ image: registry.hedenstroem.com/gitlab/gitlab-builder-go:1.7.1 before_script: - - export GOROOT=${GO_HOME} - - export GOPATH=${CI_PROJECT_DIR}/_build + - export GOPATH=${CI_PROJECT_DIR}/go + - export GOBIN=${GOPATH}/bin - export PATH=${GOPATH}/bin:${GOROOT}/bin:$PATH stages: @@ -10,36 +10,23 @@ stages: - deploy - trigger -genpasswd: +compile: stage: build only: - master script: - - go get golang.org/x/crypto/pbkdf2 - - go build -o _build/bin/genpasswd ./genpasswd + - go get ./... artifacts: paths: - - _build/bin/genpasswd - -consul-backup: - stage: build - only: - - master - script: - - go get github.com/hashicorp/consul/api - - go get github.com/docopt/docopt-go - - go build -o _build/bin/consul-backup ./consul-backup - artifacts: - paths: - - _build/bin/consul-backup + - go/bin/ aws_s3: stage: deploy only: - master script: - - aws s3 cp _build/bin/consul-backup s3://s3.erlang.ninja/consul_proxy/extras/consul-backup - - aws s3 cp _build/bin/genpasswd s3://s3.erlang.ninja/consul_proxy/extras/genpasswd + - aws s3 cp go/bin/genpasswd s3://s3.erlang.ninja/consul_proxy/extras/genpasswd + - aws s3 cp go/bin/consul-backup s3://s3.erlang.ninja/consul_proxy/extras/consul-backup trigger: stage: trigger diff --git a/consul-backup/main.go b/cmd/consul-backup/main.go similarity index 100% rename from consul-backup/main.go rename to cmd/consul-backup/main.go diff --git a/genpasswd/main.go b/cmd/genpasswd/main.go similarity index 100% rename from genpasswd/main.go rename to cmd/genpasswd/main.go