File tree Expand file tree Collapse file tree 2 files changed +50
-59
lines changed Expand file tree Collapse file tree 2 files changed +50
-59
lines changed Original file line number Diff line number Diff line change @@ -199,8 +199,9 @@ pipeline {
199199 }
200200
201201 stage (' Publishing night-build' ) {
202- when { anyOf {
203- branch ' develop' ;
202+ when {
203+ anyOf {
204+ branch ' develop' ;
204205 }
205206 }
206207 agent { label ' master' }
@@ -217,8 +218,9 @@ pipeline {
217218 }
218219
219220 stage (' Publishing preview' ) {
220- when { anyOf {
221- branch ' release/preview' ;
221+ when {
222+ anyOf {
223+ branch ' release/preview' ;
222224 }
223225 }
224226 agent { label ' master' }
@@ -257,6 +259,40 @@ pipeline {
257259 }
258260 }
259261 }
262+
263+ stage (' Publishing docker-images' ) {
264+ parallel {
265+ stage(' Build v1' ) {
266+ agent { label ' linux' }
267+ when {
268+ anyOf {
269+ branch ' latest'
270+ expression {
271+ return env. TAG_NAME && env. TAG_NAME . startsWith(' v1.' )
272+ }
273+ }
274+ }
275+ steps {
276+ publishDockerImage(' v1' )
277+ }
278+ }
279+
280+ stage(' Build v2' ) {
281+ agent { label ' linux' }
282+ when {
283+ anyOf {
284+ branch ' develop'
285+ expression {
286+ return env. TAG_NAME && env. TAG_NAME . startsWith(' v2.' )
287+ }
288+ }
289+ }
290+ steps {
291+ publishDockerImage(' v2' )
292+ }
293+ }
294+ }
295+ }
260296 }
261297}
262298
@@ -300,3 +336,13 @@ def publishReleaseNotes(codename) {
300336 }
301337}
302338
339+ def publishDockerImage (flavour ) {
340+ def dockerTag = env. TAG_NAME ? env. TAG_NAME : env. BRANCH_NAME
341+ def imageName = " evilbeaver/onescript:${ dockerTag} "
342+
343+ docker. build(
344+ imageName,
345+ " --load -f install/builders/base-image/Dockerfile_${ flavour} ."
346+ ). push()
347+ }
348+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments