forked from taliesins/terraform-provider-hyperv
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
56 lines (56 loc) · 1013 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
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
pipeline {
agent {
docker {
image 'golang'
args '-p 3030:3030'
}
}
stages {
stage('Format') {
steps {
sh 'make fmt'
}
}
stage('Test-Code') {
steps {
sh 'make test'
}
}
stage('Get-Terraform') {
steps {
sh 'go get github.com/hashicorp/terraform'
}
}
stage('Build for development') {
when {
branch 'development'
}
steps {
sh 'make build'
}
post {
always {
archiveArtifacts artifacts: 'dist/terraform-p*'
}
}
}
stage('Build for production') {
when {
branch 'production'
}
steps {
sh 'make build'
}
post {
always {
archiveArtifacts artifacts: 'dist/terrafor*'
}
}
}
}
environment {
GO111MODULE = 'on'
GOPATH = '/home/Go-Projects'
GOBIN = '/home/Go-Projects/src/github.com/tidalf/terraform-provider-hyperv/dist/'
}
}