forked from dockersamples/example-voting-app
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Jenkinsfile
31 lines (31 loc) · 893 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
node {
def resultImage
def voteImage
def workerImage
docker.withRegistry("https://index.docker.io/v1/", "dockersamples" ) {
stage('Clone repo') {
checkout scm
}
stage('Build result') {
resultImage = docker.build("dockersamples/result", "./result")
}
stage('Build vote') {
voteImage = docker.build("dockersamples/vote", "./vote")
}
stage('Build worker dotnet') {
workerImage = docker.build("dockersamples/worker", "./worker")
}
stage('Push result image') {
resultImage.push("${env.BUILD_NUMBER}")
resultImage.push()
}
stage('Push vote image') {
voteImage.push("${env.BUILD_NUMBER}")
voteImage.push()
}
stage('Push worker image') {
workerImage.push("${env.BUILD_NUMBER}")
workerImage.push()
}
}
}