forked from samsung-cnct/terraform-provider-distroimage
/
Jenkinsfile
26 lines (23 loc) · 809 Bytes
/
Jenkinsfile
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
// -*- mode: groovy -*-
// Jenkins pipeline
// See documents at https://jenkins.io/doc/book/pipeline/jenkinsfile/
podTemplate(label: 'tf-distroimage-go', containers: [
containerTemplate(name: 'jnlp', image: 'jenkinsci/jnlp-slave:2.62-alpine', args: '${computer.jnlpmac} ${computer.name}'),
containerTemplate(name: 'golang', image: 'golang:latest', ttyEnabled: true, command: 'cat'),
]) {
node('tf-distroimage-go') {
container('golang'){
stage('checkout') {
checkout scm
sh 'go version'
}
stage('build') {
sh 'go get -v -d -t ./... || true'
sh 'go build -v'
}
stage('test') {
sh 'TF_ACC=Y go test -v'
}
}
}
}