forked from Fantom-foundation/go-lachesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
50 lines (43 loc) · 1.3 KB
/
.gitlab-ci.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
image: offscale/golang-builder-alpine3.8
variables:
SONAR_SCANNER_VERSION: "sonar-scanner-cli-3.2.0.1227-linux"
stages:
- sonar
- test
- build
- deploy
before_script:
- apk update
- apk add jq util-linux
- go get -v github.com/SamuelMarks/batch-ethkey
- go get -u -d github.com/magefile/mage
- mkdir -p /go/src/github.com/Fantom-foundation
- ln -s "$CI_PROJECT_DIR" /go/src/github.com/Fantom-foundation/go-lachesis
- cd /go/src/github.com/Fantom-foundation/go-lachesis
- glide install
sonar scan:
stage: sonar
image: gitlab.fantom.technology:4567/fantom/lachesis/sonar_scanner:latest
allow_failure: true
script:
- cat /go/src/github.com/Fantom-foundation/go-lachesis/sonar-project.properties
- cat /root/sonar-scanner/conf/sonar-scanner.properties
- export PATH=$PATH:/root/sonar-scanner/bin; sonar-scanner
test code:
stage: test
allow_failure: true
script:
- cd /go/src/github.com/Fantom-foundation/go-lachesis
- go test -timeout 45s ./src/...
build code:
stage: build
script:
- cd /go/src/github.com/Fantom-foundation/go-lachesis
- scripts/multi_build.bash
deploy code:
stage: deploy
script:
- cd /go/src/github.com/Fantom-foundation/go-lachesis
- scripts/multi_build.bash
- mv lachesis_linux scripts/
- scripts/multi_run.bash