-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
56 lines (43 loc) · 1.83 KB
/
.cirrus.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
44
45
46
47
48
49
50
51
52
53
54
55
56
container:
image: golang:1.11
lint_task:
env:
CIRRUS_WORKING_DIR: /go/src/github.com/$CIRRUS_REPO_FULL_NAME
ci_tools_cache:
folder: $GOPATH/bin
get_dep_script: dep version || curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
get_golanci_lint_script: golangci-lint --version || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.11.2
dep_cache:
folder: vendor
fingerprint_script: cat Gopkg.lock
populate_script: dep ensure
lint_script: golangci-lint run
test_task:
env:
CIRRUS_WORKING_DIR: /go/src/github.com/$CIRRUS_REPO_FULL_NAME
container:
matrix:
image: golang:latest
image: golang:1.10
image: golang:1.11
image: golang:1.12
ci_tools_cache:
folder: $GOPATH/bin
get_dep_script: dep version || curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep_cache:
folder: vendor
fingerprint_script: cat Gopkg.lock
populate_script: dep ensure
test_script: go test ./...
docker_builder:
only_if: $CIRRUS_BRANCH == 'latest' || $CIRRUS_BRANCH == 'stable'
depends_on:
- test
- lint
env:
DOCKER_USERNAME: ENCRYPTED[60dbb7844e25362a784b72bce0581cb62c1878facb1ce6c79af0c5b23ddff049d90fc3237b886e9fb7ccbcf5ac973464]
DOCKER_PASSWORD: ENCRYPTED[8966b3342aaf340de1ae0994ac8a088b32656666072e667b87e7c430667438b7c18c8b30d70b0885ad743a860b182938]
login_script: printenv DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin
build_script: docker build --tag docker.io/nstapelbroek/hostupdater:$CIRRUS_BRANCH --pull --build-arg VCS_REF=$CIRRUS_CHANGE_IN_REPO .
push_script: docker push docker.io/nstapelbroek/hostupdater
meta_script: curl -X POST https://hooks.microbadger.com/images/nstapelbroek/hostupdater/Ywxmowc8rOcvEgZ_9kI6LJISwDQ=