sum7/warehost
sum7
/
warehost
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
warehost/.gitlab-ci.yml

35 lines
1.1 KiB
YAML
Raw Normal View History

2016-09-22 16:47:06 +02:00
stages:
- install-environment
- build
install-go:
stage: install-environment
script:
- export CURRENT_BUILD_PATH=$(pwd)
- echo $PATH
- rm -rf $HOME/golang
- rm -rf $HOME/gopath
- mkdir -p $HOME/golang # for GOROOT (contains the Go binary & core packages)
- mkdir -p $HOME/gopath # for GOPATH (contains code and external packages)
- curl https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz 2>/dev/null > go1.7.1.linux-amd64.tar.gz
- tar -C $HOME/golang -xzf go1.7.1.linux-amd64.tar.gz
- export GOROOT=$HOME/golang/go
- export GOPATH=$HOME/gopath
- export PATH=$PATH:$GOROOT/bin
- export PATH=$PATH:$GOPATH/bin
- (if [[ "$(go version)" == *"go version go1.7"* ]]; then echo "✓ Go binary installed!"; else echo "Go binary not installed"; exit -1; fi);
- go version
- echo $PATH
- go env
- which go
2016-09-22 17:00:33 +02:00
build-warehost:
2016-09-22 16:47:06 +02:00
stage: build
script:
2016-09-22 17:06:42 +02:00
- export GOROOT=$HOME/golang/go
- export GOPATH=$HOME/gopath
- export PATH=$PATH:$GOROOT/bin
- export PATH=$PATH:$GOPATH/bin
- go env
2016-09-22 17:00:33 +02:00
- cd $CURRENT_BUILD_PATH/cmd/warehost
- go build