Skip to content

Commit 24a9449

Browse files
author
spara
committed
added Jenkinsfile
1 parent b04febe commit 24a9449

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Jenkinsfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
node {
2+
def resultImage
3+
def voteImage
4+
def workerImage
5+
docker.withRegistry("https://index.docker.io/v1/", "dockersamples" ) {
6+
stage('Clone repo') {
7+
checkout scm
8+
}
9+
stage('Build result') {
10+
resultImage = docker.build("dockersamples/result", "./result")
11+
}
12+
stage('Build vote') {
13+
voteImage = docker.build("dockersamples/vote", "./vote")
14+
}
15+
stage('Build worker dotnet') {
16+
workerImage = docker.build("dockersamples/worker", "./worker")
17+
}
18+
stage('Push result image') {
19+
resultImage.push("${env.BUILD_NUMBER}")
20+
resultImage.push()
21+
}
22+
stage('Push vote image') {
23+
voteImage.push("${env.BUILD_NUMBER}")
24+
voteImage.push()
25+
}
26+
stage('Push worker image') {
27+
workerImage.push("${env.BUILD_NUMBER}")
28+
workerImage.push()
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)