forked from oliver006/rethinkdb_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
43 lines (37 loc) · 2.85 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
dependencies:
pre:
- sudo ntpdate -b -s -u pool.ntp.org
- source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
- wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
- sudo apt-get update
- sudo apt-get install rethinkdb
- sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
- sudo /etc/init.d/rethinkdb restart
machine:
environment:
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
COVERAGE_PROFILE: "/home/ubuntu/coverage.out"
test:
pre:
- go vet ./...
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
override:
- go test -v -cover -race -coverprofile=$COVERAGE_PROFILE .
post:
- if [ -n "$COVERALLS_TOKEN" ]; then /home/ubuntu/.go_workspace/bin/goveralls -coverprofile=$COVERAGE_PROFILE -service=circle-ci -repotoken=$COVERALLS_TOKEN ; fi
deployment:
publish:
tag: /v.*/
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- gox --osarch="darwin/amd64" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.darwin-amd64.tar.gz rethinkdb_exporter && rm rethinkdb_exporter && cd ..
- gox --osarch="darwin/386" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.darwin-386.tar.gz rethinkdb_exporter && rm rethinkdb_exporter && cd ..
- gox --osarch="linux/amd64" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.linux-amd64.tar.gz rethinkdb_exporter && rm rethinkdb_exporter && cd ..
- gox --osarch="linux/386" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.linux-386.tar.gz rethinkdb_exporter && rm rethinkdb_exporter && cd ..
- gox --osarch="netbsd/amd64" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.netbsd-amd64.tar.gz rethinkdb_exporter && rm rethinkdb_exporter && cd ..
- gox --osarch="netbsd/386" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.netbsd-386.tar.gz rethinkdb_exporter && rm rethinkdb_exporter && cd ..
- gox --osarch="windows/amd64" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.windows-amd64.tar.gz rethinkdb_exporter.exe && rm rethinkdb_exporter.exe && cd ..
- gox --osarch="windows/386" -output "dist/rethinkdb_exporter" && cd dist && tar -cvzf rethinkdb_exporter-$EXPORTER_VERSION.windows-386.tar.gz rethinkdb_exporter.exe && rm rethinkdb_exporter.exe && cd ..
- ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/