@@ -11,16 +11,20 @@ node {
11
11
def imagetag = " ${ version.trim()} .${ env.BUILD_ID} "
12
12
13
13
// Run the build and unit tests inside a maven container
14
+ stage ' build java artifacts'
14
15
buildWithMavenContainer(' demo/repo/javademo' , imagetag)
15
16
16
17
// Build the Docker images for the app and integration test
17
18
// from the artifacts built in the workspace
19
+ stage ' build docker images'
18
20
def images = buildDockerImages(' demo/repo/javademo' , imagetag)
19
21
20
22
// Start Docker app/test containers for integration testing
23
+ stage ' run integration tests'
21
24
runIntegrationTests(images[0 ], images[1 ], imagetag)
22
25
23
26
// Publish the Docker images to a Docker registry
27
+ stage ' push docker images'
24
28
publishDockerImages(images[0 ], images[1 ], imagetag)
25
29
}
26
30
catch (all)
@@ -157,6 +161,16 @@ def runIntegrationTests(appimage, testimage, imagetag)
157
161
}
158
162
}
159
163
164
+ def pushImage (image ) {
165
+
166
+ try {
167
+ // temporariy use fully qualified VDR name; shorter ose3vdr1 should be used once devops docker changes made
168
+ docker. script. sh " docker tag ${ image} ose3vdr1.services.slogvpc4.caplatformdev.com:5000/platform/${ image} "
169
+ docker. script. sh " docker push ose3vdr1.services.slogvpc4.caplatformdev.com:5000/platform/${ image} "
170
+ }
171
+ catch (all) {error " Failed to tag/push to VDR image ${ image} " }
172
+ }
173
+
160
174
// Publish Docker images to a registry only when build parameter is set
161
175
def publishDockerImages (appimage , testimage , imagetag )
162
176
{
0 commit comments