Merge "Remove beijing CSIT jobs"
[ci-management.git] / jjb / global-templates-docker.yaml
1 ---
2 ###########
3 # ANCHORS #
4 ###########
5 - docker_job_boiler_plate: &docker_job_boiler_plate
6     name: docker_job_boiler_plate
7
8     project-type: freestyle
9     node: '{build-node}'
10
11     ######################
12     # Default parameters #
13     ######################
14
15     branch: master
16     submodule-recursive: true
17
18     # default params for docker jobs
19     pre_build_script: ''
20     post_build_script: ''
21     docker_root: '$WORKSPACE'
22     docker_build_args: ''
23     docker_name: 'unnamed'
24     # Default to LF standard 'snapshots' docker registry
25     docker_registry: '$DOCKER_REGISTRY:10003'
26     docker_tag: 'latest'
27
28     #####################
29     # Job Configuration #
30     #####################
31
32     properties:
33       - lf-infra-properties:
34           build-days-to-keep: '{build-days-to-keep}'
35
36     parameters:
37       - lf-infra-parameters:
38           branch: '{branch}'
39           project: '{project}'
40           stream: '{stream}'
41           lftools-version: '{lftools-version}'
42
43     wrappers:
44       - lf-infra-wrappers:
45           build-timeout: '{build-timeout}'
46           jenkins-ssh-credential: '{jenkins-ssh-credential}'
47
48     publishers:
49       - lf-infra-publish
50
51 - docker_verify_boiler_plate: &docker_verify_boiler_plate
52     name: docker_verify_boiler_plate
53
54     concurrent: true
55
56     scm:
57       - gerrit-trigger-scm:
58           refspec: '$GERRIT_REFSPEC'
59           choosing-strategy: 'default'
60           submodule-recursive: '{submodule-recursive}'
61
62     triggers:
63       - gerrit-trigger-patch-submitted:
64           status-context: '{project}-Docker-Verify'
65           server: '{server-name}'
66           project: '{project}'
67           branch: '{branch}'
68           files: '{files}'
69
70 - docker_merge_boiler_plate: &docker_merge_boiler_plate
71     name: docker_merge_boiler_plate
72
73     scm:
74       - gerrit-trigger-scm:
75           refspec: '$GERRIT_REFSPEC'
76           choosing-strategy: 'default'
77           submodule-recursive: '{submodule-recursive}'
78
79     triggers:
80       - gerrit-trigger-patch-merged:
81           server: '{server-name}'
82           project: '{project}'
83           branch: '{branch}'
84           files: '{files}'
85       - pollscm:
86           cron: ''
87
88 #################
89 # JOB TEMPLATES #
90 #################
91 - job-template:
92     name: '{project-name}-{stream}-merge-docker'
93     # Job template for Docker merge jobs
94     #
95     # The purpose of this job template is to run a docker build, and potentially
96     # test validation of the docker image
97
98     <<: *docker_job_boiler_plate
99     # yamllint disable-line rule:key-duplicates
100     <<: *docker_merge_boiler_plate
101
102     builders:
103       - lf-infra-docker-login:
104           global-settings-file: 'global-settings'
105           settings-file: '{mvn-settings}'
106       - shell: '{pre_build_script}'
107       - inject:
108           # Docker registry is purposely not using an '_' so as to not conflict
109           # with the Jenkins global env var
110           properties-content: |
111             DOCKER_ARGS={docker_build_args}
112             DOCKER_NAME={docker_name}
113             DOCKER_ROOT={docker_root}
114             DOCKER_TAG={docker_tag}
115             BUILD_MODE=SNAPSHOT
116             DOCKERREGISTRY={docker_registry}
117       # Do the docker build
118       - shell: !include-raw: ../shell/docker-build.sh
119       - inject:
120           # Import the docker image information from the build step
121           properties-file: 'env_inject.txt'
122       # Execute any post build clean-up or testing
123       - shell: '{post_build_script}'
124       # Provided all steps have already passed, push the docker image
125       - shell: !include-raw: ../shell/docker-push.sh
126
127 - job-template:
128     name: '{project-name}-{stream}-merge-docker-cascade-trigger'
129     # Job template for Docker merge jobs
130     #
131     # The purpose of this job template is to run a docker build, and potentially
132     # test validation of the docker image. This job is triggered by the it's corresponding
133     # job that builds the artifacts from which the docker image is built from. Projects
134     # using the {project-name}-{stream}-merge-docker job should move to this job. Because
135     # the {project-name}-{stream}-merge-docker has no garanties that the docker image is built
136     # from merged artifact.
137
138     <<: *docker_job_boiler_plate
139     # yamllint disable-line rule:key-duplicates
140     <<: *docker_merge_boiler_plate
141
142     builders:
143       - lf-infra-docker-login:
144           global-settings-file: 'global-settings'
145           settings-file: '{mvn-settings}'
146       - shell: '{pre_build_script}'
147       - inject:
148           # Docker registry is purposely not using an '_' so as to not conflict
149           # with the Jenkins global env var
150           properties-content: |
151             DOCKER_ARGS={docker_build_args}
152             DOCKER_NAME={docker_name}
153             DOCKER_ROOT={docker_root}
154             DOCKER_TAG={docker_tag}
155             BUILD_MODE=SNAPSHOT
156             DOCKERREGISTRY={docker_registry}
157       # Do the docker build
158       - shell: !include-raw: ../shell/docker-build.sh
159       - inject:
160           # Import the docker image information from the build step
161           properties-file: 'env_inject.txt'
162       # Execute any post build clean-up or testing
163       - shell: '{post_build_script}'
164       # Provided all steps have already passed, push the docker image
165       - shell: !include-raw: ../shell/docker-push.sh
166     triggers:
167       - reverse:
168           jobs:
169             - '{parent_job}'
170           result: 'success'
171
172 - job-template:
173     name: '{project-name}-{stream}-verify-docker'
174     # Job template for Docker verify jobs
175     #
176     # The purpose of this job template is to run a docker build, and potentially
177     # test validation of the docker image
178
179     ######################
180     # Default parameters #
181     ######################
182
183     <<: *docker_job_boiler_plate
184     # yamllint disable-line rule:key-duplicates
185     <<: *docker_verify_boiler_plate
186
187     builders:
188       - lf-infra-docker-login:
189           global-settings-file: 'global-settings'
190           settings-file: '{mvn-settings}'
191       - shell: '{pre_build_script}'
192       - inject:
193           # Docker registry is purposely not using an '_' so as to not conflict
194           # with the Jenkins global env var
195           properties-content: |
196             DOCKER_ARGS={docker_build_args}
197             DOCKER_NAME={docker_name}
198             DOCKER_ROOT={docker_root}
199             DOCKER_TAG={docker_tag}
200             BUILD_MODE=SNAPSHOT
201             DOCKERREGISTRY={docker_registry}
202       # Do the docker build
203       - shell: !include-raw: ../shell/docker-build.sh
204       - inject:
205           # Import the docker image information from the build step
206           properties-file: 'env_inject.txt'
207       # Execute any post build clean-up or testing
208       - shell: '{post_build_script}'
209
210 - job-template:
211     name: '{project-name}-{stream}-verify-docker-cascade-trigger'
212     # Job template for Docker verify jobs
213     #
214     # The purpose of this job template is to run a docker build, and potentially
215     # test validation of the docker image. This job is triggered by the it's corresponding
216     # job that builds the artifacts from which the docker image is built from. Projects
217     # using the {project-name}-{stream}-verify-docker job should move to this job. Because
218     # the {project-name}-{stream}-verify-docker has no garanties that the docker image is built
219     # from merged artifact.
220
221     ######################
222     # Default parameters #
223     ######################
224
225     <<: *docker_job_boiler_plate
226     # yamllint disable-line rule:key-duplicates
227     <<: *docker_verify_boiler_plate
228
229     builders:
230       - lf-infra-docker-login:
231           global-settings-file: 'global-settings'
232           settings-file: '{mvn-settings}'
233       - shell: '{pre_build_script}'
234       - inject:
235           # Docker registry is purposely not using an '_' so as to not conflict
236           # with the Jenkins global env var
237           properties-content: |
238             DOCKER_ARGS={docker_build_args}
239             DOCKER_NAME={docker_name}
240             DOCKER_ROOT={docker_root}
241             DOCKER_TAG={docker_tag}
242             BUILD_MODE=SNAPSHOT
243             DOCKERREGISTRY={docker_registry}
244       # Do the docker build
245       - shell: !include-raw: ../shell/docker-build.sh
246       - inject:
247           # Import the docker image information from the build step
248           properties-file: 'env_inject.txt'
249       # Execute any post build clean-up or testing
250       - shell: '{post_build_script}'
251     triggers:
252       - reverse:
253           jobs:
254             - '{parent_job}'
255           result: 'success'
256
257 - job-template:
258     name: '{project-name}-{stream}-release-version-docker-daily-no-sonar'
259     # Job template for Docker daily release jobs
260     #
261     # The purpose of this job template is to run "docker build and docker push"
262     # for projects using this template.
263     #
264     # Required Variables:
265     #     branch:    git branch (eg. stable/lithium or master)
266     <<: *docker_job_boiler_plate
267
268     docker_registry: '$DOCKER_REGISTRY:10003'
269
270     scm:
271       - lf-infra-gerrit-scm:
272           jenkins-ssh-credential: '{jenkins-ssh-credential}'
273           git-url: '$GIT_URL/$PROJECT'
274           refspec: '$GERRIT_REFSPEC'
275           branch: '$GERRIT_BRANCH'
276           submodule-recursive: true
277           choosing-strategy: default
278
279     builders:
280       - lf-infra-docker-login:
281           global-settings-file: 'global-settings'
282           settings-file: '{mvn-settings}'
283       - shell: '{pre_build_script}'
284       - inject:
285           # Docker registry is purposely not using an '_' so as to not conflict
286           # with the Jenkins global env var
287           properties-content: |
288             DOCKER_ARGS={docker_build_args}
289             DOCKER_NAME={docker_name}
290             DOCKER_ROOT={docker_root}
291             DOCKER_TAG={docker_tag}
292             DOCKERREGISTRY={docker_registry}
293             BUILD_MODE=STAGING
294
295       # Do the docker build
296       - shell: !include-raw: ../shell/snapshot-strip.sh
297       - shell: !include-raw: ../shell/docker-build.sh
298       - inject:
299           # Import the docker image information from the build step
300           properties-file: 'env_inject.txt'
301       # Execute any post build clean-up or testing
302       - shell: '{post_build_script}'
303       # Provided all steps have already passed, push the docker image
304       - shell: !include-raw: ../shell/docker-push.sh
305
306     triggers:
307       # 11 AM UTC
308       - timed: '@daily'
309       - gerrit-trigger-release-manually:
310           server: '{server-name}'
311           project: '{project}'
312           branch: '{branch}'
313
314 - job-template:
315     name: '{project-name}-{stream}-release-version-docker-daily-no-sonar-cascade-trigger'
316     # Job template for Docker daily release job.
317     #
318     # The purpose of this job template is to run "docker build and docker push"
319     # for projects using this template. This job is triggered by the daily build
320     # that builds the artifacts required for building the Docker image.
321     #
322     # Required Variables:
323     #     branch:    git branch (eg. stable/lithium or master)
324     <<: *docker_job_boiler_plate
325
326     docker_registry: '$DOCKER_REGISTRY:10003'
327
328     scm:
329       - lf-infra-gerrit-scm:
330           jenkins-ssh-credential: '{jenkins-ssh-credential}'
331           git-url: '$GIT_URL/$PROJECT'
332           refspec: '$GERRIT_REFSPEC'
333           branch: '$GERRIT_BRANCH'
334           submodule-recursive: true
335           choosing-strategy: default
336
337     builders:
338       - lf-infra-docker-login:
339           global-settings-file: 'global-settings'
340           settings-file: '{mvn-settings}'
341       - shell: '{pre_build_script}'
342       - inject:
343           # Docker registry is purposely not using an '_' so as to not conflict
344           # with the Jenkins global env var
345           properties-content: |
346             DOCKER_ARGS={docker_build_args}
347             DOCKER_NAME={docker_name}
348             DOCKER_ROOT={docker_root}
349             DOCKER_TAG={docker_tag}
350             DOCKERREGISTRY={docker_registry}
351             BUILD_MODE=STAGING
352
353       # Do the docker build
354       - shell: !include-raw: ../shell/snapshot-strip.sh
355       - shell: !include-raw: ../shell/docker-build.sh
356       - inject:
357           # Import the docker image information from the build step
358           properties-file: 'env_inject.txt'
359       # Execute any post build clean-up or testing
360       - shell: '{post_build_script}'
361       # Provided all steps have already passed, push the docker image
362       - shell: !include-raw: ../shell/docker-push.sh
363
364     triggers:
365       - reverse:
366           jobs:
367             - '{parent_job}'
368           result: 'success'
369
370 - job-template:
371     name: '{project-name}-{subproject}-{stream}-merge-docker'
372     # Job template for Docker merge jobs
373     #
374     # The purpose of this job template is to run a docker build, and potentially
375     # test validation of the docker image
376
377     <<: *docker_job_boiler_plate
378     # yamllint disable-line rule:key-duplicates
379     <<: *docker_merge_boiler_plate
380
381     builders:
382       - lf-infra-docker-login:
383           global-settings-file: 'global-settings'
384           settings-file: '{mvn-settings}'
385       - shell: '{pre_build_script}'
386       - inject:
387           # Docker registry is purposely not using an '_' so as to not conflict
388           # with the Jenkins global env var
389           properties-content: |
390             DOCKER_ARGS={docker_build_args}
391             DOCKER_NAME={docker_name}
392             DOCKER_ROOT={docker_root}
393             DOCKER_TAG={docker_tag}
394             DOCKERREGISTRY={docker_registry}
395             BUILD_MODE=SNAPSHOT
396       # Do the docker build
397       - shell: !include-raw: ../shell/docker-build.sh
398       - inject:
399           # Import the docker image information from the build step
400           properties-file: 'env_inject.txt'
401       # Execute any post build clean-up or testing
402       - shell: '{post_build_script}'
403       # Provided all steps have already passed, push the docker image
404       - shell: !include-raw: ../shell/docker-push.sh
405
406 - job-template:
407     name: '{project-name}-{subproject}-{stream}-merge-docker-cascade-trigger'
408     # Job template for Docker merge jobs
409     #
410     # The purpose of this job template is to run a docker build, and potentially
411     # test validation of the docker image. This job is triggered by the merge job
412     # that builds the artifacts required for building the Docker image.
413
414     <<: *docker_job_boiler_plate
415     # yamllint disable-line rule:key-duplicates
416     <<: *docker_merge_boiler_plate
417
418     builders:
419       - lf-infra-docker-login:
420           global-settings-file: 'global-settings'
421           settings-file: '{mvn-settings}'
422       - shell: '{pre_build_script}'
423       - inject:
424           # Docker registry is purposely not using an '_' so as to not conflict
425           # with the Jenkins global env var
426           properties-content: |
427             DOCKER_ARGS={docker_build_args}
428             DOCKER_NAME={docker_name}
429             DOCKER_ROOT={docker_root}
430             DOCKER_TAG={docker_tag}
431             DOCKERREGISTRY={docker_registry}
432             BUILD_MODE=SNAPSHOT
433       # Do the docker build
434       - shell: !include-raw: ../shell/docker-build.sh
435       - inject:
436           # Import the docker image information from the build step
437           properties-file: 'env_inject.txt'
438       # Execute any post build clean-up or testing
439       - shell: '{post_build_script}'
440       # Provided all steps have already passed, push the docker image
441       - shell: !include-raw: ../shell/docker-push.sh
442     triggers:
443       - reverse:
444           jobs:
445             - '{parent_job}'
446           result: 'success'
447
448 - job-template:
449     name: '{project-name}-{subproject}-{stream}-verify-docker'
450     # Job template for Docker verify jobs
451     #
452     # The purpose of this job template is to run a docker build, and potentially
453     # test validation of the docker image
454
455     ######################
456     # Default parameters #
457     ######################
458
459     <<: *docker_job_boiler_plate
460     # yamllint disable-line rule:key-duplicates
461     <<: *docker_verify_boiler_plate
462
463     builders:
464       - lf-infra-docker-login:
465           global-settings-file: 'global-settings'
466           settings-file: '{mvn-settings}'
467       - shell: '{pre_build_script}'
468       - inject:
469           # Docker registry is purposely not using an '_' so as to not conflict
470           # with the Jenkins global env var
471           properties-content: |
472             DOCKER_ARGS={docker_build_args}
473             DOCKER_NAME={docker_name}
474             DOCKER_ROOT={docker_root}
475             DOCKER_TAG={docker_tag}
476             DOCKERREGISTRY={docker_registry}
477             BUILD_MODE=SNAPSHOT
478       # Do the docker build
479       - shell: !include-raw: ../shell/docker-build.sh
480       - inject:
481           # Import the docker image information from the build step
482           properties-file: 'env_inject.txt'
483       # Execute any post build clean-up or testing
484       - shell: '{post_build_script}'
485
486 - job-template:
487     name: '{project-name}-{subproject}-{stream}-verify-docker-cascade-trigger'
488     # Job template for Docker verify jobs
489     #
490     # The purpose of this job template is to run a docker build, and potentially
491     # test validation of the docker image
492
493     ######################
494     # Default parameters #
495     ######################
496
497     <<: *docker_job_boiler_plate
498     # yamllint disable-line rule:key-duplicates
499     <<: *docker_verify_boiler_plate
500
501     builders:
502       - lf-infra-docker-login:
503           global-settings-file: 'global-settings'
504           settings-file: '{mvn-settings}'
505       - shell: '{pre_build_script}'
506       - inject:
507           # Docker registry is purposely not using an '_' so as to not conflict
508           # with the Jenkins global env var
509           properties-content: |
510             DOCKER_ARGS={docker_build_args}
511             DOCKER_NAME={docker_name}
512             DOCKER_ROOT={docker_root}
513             DOCKER_TAG={docker_tag}
514             DOCKERREGISTRY={docker_registry}
515             BUILD_MODE=SNAPSHOT
516       # Do the docker build
517       - shell: !include-raw: ../shell/docker-build.sh
518       - inject:
519           # Import the docker image information from the build step
520           properties-file: 'env_inject.txt'
521       # Execute any post build clean-up or testing
522       - shell: '{post_build_script}'
523     triggers:
524       - reverse:
525           jobs:
526             - '{parent_job}'
527           result: 'success'
528
529 - job-template:
530     name: '{project-name}-{subproject}-{stream}-release-version-docker-daily-no-sonar'
531     # Job template for Docker daily release jobs
532     #
533     # The purpose of this job template is to run "docker build and docker push"
534     # for projects using this template.
535     #
536     # Required Variables:
537     #     branch:    git branch (eg. stable/lithium or master)
538     <<: *docker_job_boiler_plate
539
540     docker_registry: '$DOCKER_REGISTRY:10003'
541
542     scm:
543       - lf-infra-gerrit-scm:
544           jenkins-ssh-credential: '{jenkins-ssh-credential}'
545           git-url: '$GIT_URL/$PROJECT'
546           refspec: '$GERRIT_REFSPEC'
547           branch: '$GERRIT_BRANCH'
548           submodule-recursive: true
549           choosing-strategy: default
550
551     builders:
552       - lf-infra-docker-login:
553           global-settings-file: 'global-settings'
554           settings-file: '{mvn-settings}'
555       - shell: '{pre_build_script}'
556       - inject:
557           # Docker registry is purposely not using an '_' so as to not conflict
558           # with the Jenkins global env var
559           properties-content: |
560             DOCKER_ARGS={docker_build_args}
561             DOCKER_NAME={docker_name}
562             DOCKER_ROOT={docker_root}
563             DOCKER_TAG={docker_tag}
564             DOCKERREGISTRY={docker_registry}
565             BUILD_MODE=STAGING
566
567       # Do the docker build
568       - shell: !include-raw: ../shell/snapshot-strip.sh
569       - shell: !include-raw: ../shell/docker-build.sh
570       - inject:
571           # Import the docker image information from the build step
572           properties-file: 'env_inject.txt'
573       # Execute any post build clean-up or testing
574       - shell: '{post_build_script}'
575       # Provided all steps have already passed, push the docker image
576       - shell: !include-raw: ../shell/docker-push.sh
577
578     triggers:
579       # 11 AM UTC
580       - timed: '@daily'
581       - gerrit-trigger-release-manually:
582           server: '{server-name}'
583           project: '{project}'
584           branch: '{branch}'
585
586 - job-template:
587     name: '{project-name}-{subproject}-{stream}-release-version-docker-daily-no-sonar-cascade-trigger'
588     # Job template for Docker daily release jobs
589     #
590     # The purpose of this job template is to run "docker build and docker push"
591     # for projects using this template. This job is triggered by the daily job
592     # that builds the artifacts required for building the Docker image.
593     #
594     # Required Variables:
595     #     branch:    git branch (eg. stable/lithium or master)
596     <<: *docker_job_boiler_plate
597
598     docker_registry: '$DOCKER_REGISTRY:10003'
599
600     scm:
601       - lf-infra-gerrit-scm:
602           jenkins-ssh-credential: '{jenkins-ssh-credential}'
603           git-url: '$GIT_URL/$PROJECT'
604           refspec: '$GERRIT_REFSPEC'
605           branch: '$GERRIT_BRANCH'
606           submodule-recursive: true
607           choosing-strategy: default
608
609     builders:
610       - lf-infra-docker-login:
611           global-settings-file: 'global-settings'
612           settings-file: '{mvn-settings}'
613       - shell: '{pre_build_script}'
614       - inject:
615           # Docker registry is purposely not using an '_' so as to not conflict
616           # with the Jenkins global env var
617           properties-content: |
618             DOCKER_ARGS={docker_build_args}
619             DOCKER_NAME={docker_name}
620             DOCKER_ROOT={docker_root}
621             DOCKER_TAG={docker_tag}
622             DOCKERREGISTRY={docker_registry}
623             BUILD_MODE=STAGING
624
625       # Do the docker build
626       - shell: !include-raw: ../shell/snapshot-strip.sh
627       - shell: !include-raw: ../shell/docker-build.sh
628       - inject:
629           # Import the docker image information from the build step
630           properties-file: 'env_inject.txt'
631       # Execute any post build clean-up or testing
632       - shell: '{post_build_script}'
633       # Provided all steps have already passed, push the docker image
634       - shell: !include-raw: ../shell/docker-push.sh
635
636     triggers:
637       - reverse:
638           jobs:
639             - '{parent_job}'
640           result: 'success'
641
642 - job-template:
643     name: '{project-name}-{subproject}-{stream}-release-version-docker-no-sonar'
644     # Job template for Docker final release job
645     #
646     # The purpose of this job template is to run "docker build and docker push"
647     # for projects using this template.
648     #
649     # Required Variables:
650     #     branch:    git branch (eg. stable/lithium or master)
651     <<: *docker_job_boiler_plate
652
653     docker_registry: '$DOCKER_REGISTRY:10003'
654
655     scm:
656       - lf-infra-gerrit-scm:
657           jenkins-ssh-credential: '{jenkins-ssh-credential}'
658           git-url: '$GIT_URL/$PROJECT'
659           refspec: '$GERRIT_REFSPEC'
660           branch: '$GERRIT_BRANCH'
661           submodule-recursive: true
662           choosing-strategy: default
663
664     builders:
665       - lf-infra-docker-login:
666           global-settings-file: 'global-settings'
667           settings-file: '{mvn-settings}'
668       - shell: '{pre_build_script}'
669       - inject:
670           # Docker registry is purposely not using an '_' so as to not conflict
671           # with the Jenkins global env var
672           properties-content: |
673             DOCKER_ARGS={docker_build_args}
674             DOCKER_NAME={docker_name}
675             DOCKER_ROOT={docker_root}
676             DOCKER_TAG={docker_tag}
677             DOCKERREGISTRY={docker_registry}
678             BUILD_MODE=STAGING
679
680       # Do the docker build
681       - shell: !include-raw: ../shell/snapshot-strip.sh
682       - shell: !include-raw: ../shell/docker-build.sh
683       - inject:
684           # Import the docker image information from the build step
685           properties-file: 'env_inject.txt'
686       # Execute any post build clean-up or testing
687       - shell: '{post_build_script}'
688       # Provided all steps have already passed, push the docker image
689       - shell: !include-raw: ../shell/docker-push.sh
690
691 - job-template:
692     name: '{project-name}-{subproject}-{stream}-release-version-docker-cascade-trigger-no-sonar'
693     # Job template for Docker final release job
694     #
695     # The purpose of this job template is to run "docker build and docker push"
696     # for projects using this template. This job has no cascading counterpart, because the
697     # final release is moved manually to the release repo.
698     #
699     # Required Variables:
700     #     branch:    git branch (eg. stable/lithium or master)
701     <<: *docker_job_boiler_plate
702
703     docker_registry: '$DOCKER_REGISTRY:10003'
704
705     scm:
706       - lf-infra-gerrit-scm:
707           jenkins-ssh-credential: '{jenkins-ssh-credential}'
708           git-url: '$GIT_URL/$PROJECT'
709           refspec: '$GERRIT_REFSPEC'
710           branch: '$GERRIT_BRANCH'
711           submodule-recursive: true
712           choosing-strategy: default
713
714     builders:
715       - lf-infra-docker-login:
716           global-settings-file: 'global-settings'
717           settings-file: '{mvn-settings}'
718       - shell: '{pre_build_script}'
719       - inject:
720           # Docker registry is purposely not using an '_' so as to not conflict
721           # with the Jenkins global env var
722           properties-content: |
723             DOCKER_ARGS={docker_build_args}
724             DOCKER_NAME={docker_name}
725             DOCKER_ROOT={docker_root}
726             DOCKER_TAG={docker_tag}
727             DOCKERREGISTRY={docker_registry}
728             BUILD_MODE=STAGING
729
730       # Do the docker build
731       - shell: !include-raw: ../shell/snapshot-strip.sh
732       - shell: !include-raw: ../shell/docker-build.sh
733       - inject:
734           # Import the docker image information from the build step
735           properties-file: 'env_inject.txt'
736       # Execute any post build clean-up or testing
737       - shell: '{post_build_script}'
738       # Provided all steps have already passed, push the docker image
739       - shell: !include-raw: ../shell/docker-push.sh
740     triggers:
741       - reverse:
742           jobs:
743             - '{parent_job}'
744           result: 'success'
745
746