-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
40 lines (35 loc) · 829 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
def image
pipeline {
agent any
stages {
stage('Build') {
tools {
go '1.17.5'
}
steps {
sh 'CGO_ENABLED=0 go build'
}
}
stage('Store') {
steps {
archiveArtifacts artifacts: 'improvised', followSymlinks: false
}
}
stage('Docker Build') {
steps {
script {
image = docker.build("3l0w/improvised:latest")
}
}
}
stage('Deploy') {
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'dockerhub') {
image.push()
}
}
}
}
}
}