File tree Expand file tree Collapse file tree 1 file changed +17
-41
lines changed Expand file tree Collapse file tree 1 file changed +17
-41
lines changed Original file line number Diff line number Diff line change 1
- pipeline {
1
+ pipeline{
2
2
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'
27
7
}
28
8
}
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'
37
15
}
38
16
}
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'
47
23
}
48
24
}
49
25
}
You can’t perform that action at this time.
0 commit comments