Skip to content

Commit ae34f49

Browse files
authored
Update Jenkinsfile as new template
To avoid the hassle start from scratch.
1 parent ade83bf commit ae34f49

File tree

1 file changed

+17
-41
lines changed

1 file changed

+17
-41
lines changed

Jenkinsfile

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,25 @@
1-
pipeline {
1+
pipeline{
22
agent any
3-
stages {
4-
stage('Build result') {
5-
steps {
6-
sh 'docker build -t dockersamples/result ./result'
7-
}
8-
}
9-
stage('Build vote') {
10-
steps {
11-
sh 'docker build -t dockersamples/vote ./vote'
12-
}
13-
}
14-
stage('Build worker') {
15-
steps {
16-
sh 'docker build -t dockersamples/worker ./worker'
17-
}
18-
}
19-
stage('Push result image') {
20-
when {
21-
branch 'master'
22-
}
23-
steps {
24-
withDockerRegistry(credentialsId: 'dockerbuildbot-index.docker.io', url:'') {
25-
sh 'docker push dockersamples/result'
26-
}
3+
stages{
4+
stage('Build'){
5+
step{
6+
echo 'Building the application'
277
}
288
}
29-
stage('Push vote image') {
30-
when {
31-
branch 'master'
32-
}
33-
steps {
34-
withDockerRegistry(credentialsId: 'dockerbuildbot-index.docker.io', url:'') {
35-
sh 'docker push dockersamples/vote'
36-
}
9+
}
10+
11+
stages{
12+
stage('Test'){
13+
step{
14+
echo 'Testing the application'
3715
}
3816
}
39-
stage('Push worker image') {
40-
when {
41-
branch 'master'
42-
}
43-
steps {
44-
withDockerRegistry(credentialsId: 'dockerbuildbot-index.docker.io', url:'') {
45-
sh 'docker push dockersamples/worker'
46-
}
17+
}
18+
19+
stages{
20+
stage('Deploy'){
21+
step{
22+
echo 'Deploy the application'
4723
}
4824
}
4925
}

0 commit comments

Comments
 (0)