-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.DockerInDocker
45 lines (39 loc) · 1.36 KB
/
Jenkinsfile.DockerInDocker
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
pipeline {
agent {
docker {
image 'tenrero/golang-dep-alpine:1.10.2'
reuseNode true
args '-it -v /var/run/docker.sock:/var/run/docker.sock -v $WORKSPACE:/tmp/app'
}
}
stages {
stage('Prepare Environment') {
steps {
sh 'echo $GOPATH'
sh 'mkdir -p /go/src/github.com/mtenrero/'
sh 'ln -s /tmp/app /go/src/github.com/mtenrero/ATQ-Director'
sh 'ls -a /go/src/github.com/mtenrero/ATQ-Director'
sh 'go get -u github.com/golang/dep/cmd/dep'
sh 'go get -u github.com/golang/lint/golint'
sh 'go get -u github.com/tebeka/go2xunit'
sh 'go get -u golang.org/x/tools/cmd/cover'
sh 'go get -u github.com/mattn/goveralls'
}
}
stage('Download Vendor') {
steps {
sh 'cd /go/src/github.com/mtenrero/ATQ-Director && dep ensure'
}
}
stage('Test') {
steps {
sh 'cd /go/src/github.com/mtenrero/ATQ-Director && go test ./... -race -coverprofile=coverage.txt -covermode=atomic'
}
}
stage('Build') {
steps {
sh 'cd /go/src/github.com/mtenrero/ATQ-Director && ./build.sh'
}
}
}
}