5 - docker_job_boiler_plate: &docker_job_boiler_plate
6 name: docker_job_boiler_plate
8 project-type: freestyle
11 ######################
12 # Default parameters #
13 ######################
16 submodule-recursive: true
18 # default params for docker jobs
21 docker_root: '$WORKSPACE'
23 docker_name: 'unnamed'
24 # Default to LF standard 'snapshots' docker registry
25 docker_registry: '$DOCKER_REGISTRY:10003'
27 submodule-disable: false
35 - lf-infra-properties:
36 build-days-to-keep: '{build-days-to-keep}'
39 - lf-infra-parameters:
43 lftools-version: '{lftools-version}'
47 build-timeout: '{build-timeout}'
48 jenkins-ssh-credential: '{jenkins-ssh-credential}'
53 - docker_verify_boiler_plate: &docker_verify_boiler_plate
54 name: docker_verify_boiler_plate
60 refspec: '$GERRIT_REFSPEC'
61 choosing-strategy: 'default'
62 submodule-recursive: '{submodule-recursive}'
65 - gerrit-trigger-patch-submitted:
66 status-context: '{project}-Docker-Verify'
67 server: '{server-name}'
72 - docker_merge_boiler_plate: &docker_merge_boiler_plate
73 name: docker_merge_boiler_plate
77 refspec: '$GERRIT_REFSPEC'
78 choosing-strategy: 'default'
79 submodule-recursive: '{submodule-recursive}'
82 - gerrit-trigger-patch-merged:
83 server: '{server-name}'
94 name: '{project-name}-{stream}-merge-docker'
95 # Job template for Docker merge jobs
97 # The purpose of this job template is to run a docker build, and potentially
98 # test validation of the docker image
100 <<: *docker_job_boiler_plate
101 # yamllint disable-line rule:key-duplicates
102 <<: *docker_merge_boiler_plate
106 - lf-infra-docker-login:
107 global-settings-file: 'global-settings'
108 settings-file: '{mvn-settings}'
109 - shell: '{pre_build_script}'
111 # Docker registry is purposely not using an '_' so as to not conflict
112 # with the Jenkins global env var
113 properties-content: |
114 DOCKER_ARGS={docker_build_args}
115 DOCKER_NAME={docker_name}
116 DOCKER_ROOT={docker_root}
117 DOCKER_TAG={docker_tag}
119 DOCKERREGISTRY={docker_registry}
120 # Do the docker build
121 - shell: !include-raw: ../shell/docker-build.sh
123 # Import the docker image information from the build step
124 properties-file: 'env_inject.txt'
125 # Execute any post build clean-up or testing
126 - shell: '{post_build_script}'
127 # Provided all steps have already passed, push the docker image
128 - shell: !include-raw: ../shell/docker-push.sh
131 name: '{project-name}-{stream}-merge-docker-cascade-trigger'
132 # Job template for Docker merge jobs
134 # The purpose of this job template is to run a docker build, and potentially
135 # test validation of the docker image. This job is triggered by the it's corresponding
136 # job that builds the artifacts from which the docker image is built from. Projects
137 # using the {project-name}-{stream}-merge-docker job should move to this job. Because
138 # the {project-name}-{stream}-merge-docker has no garanties that the docker image is built
139 # from merged artifact.
141 <<: *docker_job_boiler_plate
142 # yamllint disable-line rule:key-duplicates
143 <<: *docker_merge_boiler_plate
147 - lf-infra-docker-login:
148 global-settings-file: 'global-settings'
149 settings-file: '{mvn-settings}'
150 - shell: '{pre_build_script}'
152 # Docker registry is purposely not using an '_' so as to not conflict
153 # with the Jenkins global env var
154 properties-content: |
155 DOCKER_ARGS={docker_build_args}
156 DOCKER_NAME={docker_name}
157 DOCKER_ROOT={docker_root}
158 DOCKER_TAG={docker_tag}
160 DOCKERREGISTRY={docker_registry}
161 # Do the docker build
162 - shell: !include-raw: ../shell/docker-build.sh
164 # Import the docker image information from the build step
165 properties-file: 'env_inject.txt'
166 # Execute any post build clean-up or testing
167 - shell: '{post_build_script}'
168 # Provided all steps have already passed, push the docker image
169 - shell: !include-raw: ../shell/docker-push.sh
177 name: '{project-name}-{stream}-verify-docker'
178 # Job template for Docker verify jobs
180 # The purpose of this job template is to run a docker build, and potentially
181 # test validation of the docker image
183 ######################
184 # Default parameters #
185 ######################
187 <<: *docker_job_boiler_plate
188 # yamllint disable-line rule:key-duplicates
189 <<: *docker_verify_boiler_plate
193 - lf-infra-docker-login:
194 global-settings-file: 'global-settings'
195 settings-file: '{mvn-settings}'
196 - shell: '{pre_build_script}'
198 # Docker registry is purposely not using an '_' so as to not conflict
199 # with the Jenkins global env var
200 properties-content: |
201 DOCKER_ARGS={docker_build_args}
202 DOCKER_NAME={docker_name}
203 DOCKER_ROOT={docker_root}
204 DOCKER_TAG={docker_tag}
206 DOCKERREGISTRY={docker_registry}
207 # Do the docker build
208 - shell: !include-raw: ../shell/docker-build.sh
210 # Import the docker image information from the build step
211 properties-file: 'env_inject.txt'
212 # Execute any post build clean-up or testing
213 - shell: '{post_build_script}'
216 name: '{project-name}-{stream}-verify-docker-cascade-trigger'
217 # Job template for Docker verify jobs
219 # The purpose of this job template is to run a docker build, and potentially
220 # test validation of the docker image. This job is triggered by the it's corresponding
221 # job that builds the artifacts from which the docker image is built from. Projects
222 # using the {project-name}-{stream}-verify-docker job should move to this job. Because
223 # the {project-name}-{stream}-verify-docker has no garanties that the docker image is built
224 # from merged artifact.
226 ######################
227 # Default parameters #
228 ######################
230 <<: *docker_job_boiler_plate
231 # yamllint disable-line rule:key-duplicates
232 <<: *docker_verify_boiler_plate
236 - lf-infra-docker-login:
237 global-settings-file: 'global-settings'
238 settings-file: '{mvn-settings}'
239 - shell: '{pre_build_script}'
241 # Docker registry is purposely not using an '_' so as to not conflict
242 # with the Jenkins global env var
243 properties-content: |
244 DOCKER_ARGS={docker_build_args}
245 DOCKER_NAME={docker_name}
246 DOCKER_ROOT={docker_root}
247 DOCKER_TAG={docker_tag}
249 DOCKERREGISTRY={docker_registry}
250 # Do the docker build
251 - shell: !include-raw: ../shell/docker-build.sh
253 # Import the docker image information from the build step
254 properties-file: 'env_inject.txt'
255 # Execute any post build clean-up or testing
256 - shell: '{post_build_script}'
264 name: '{project-name}-{stream}-release-version-docker-daily-no-sonar'
265 # Job template for Docker daily release jobs
267 # The purpose of this job template is to run "docker build and docker push"
268 # for projects using this template.
270 # Required Variables:
271 # branch: git branch (eg. stable/lithium or master)
272 <<: *docker_job_boiler_plate
274 docker_registry: '$DOCKER_REGISTRY:10003'
277 - lf-infra-gerrit-scm:
278 jenkins-ssh-credential: '{jenkins-ssh-credential}'
279 git-url: '$GIT_URL/$PROJECT'
280 refspec: '$GERRIT_REFSPEC'
281 branch: '$GERRIT_BRANCH'
282 submodule-recursive: true
283 submodule-timeout: '{submodule-timeout}'
284 submodule-disable: '{submodule-disable}'
285 choosing-strategy: default
289 - lf-infra-docker-login:
290 global-settings-file: 'global-settings'
291 settings-file: '{mvn-settings}'
292 - shell: '{pre_build_script}'
294 # Docker registry is purposely not using an '_' so as to not conflict
295 # with the Jenkins global env var
296 properties-content: |
297 DOCKER_ARGS={docker_build_args}
298 DOCKER_NAME={docker_name}
299 DOCKER_ROOT={docker_root}
300 DOCKER_TAG={docker_tag}
301 DOCKERREGISTRY={docker_registry}
304 # Do the docker build
305 - shell: !include-raw: ../shell/snapshot-strip.sh
306 - shell: !include-raw: ../shell/docker-build.sh
308 # Import the docker image information from the build step
309 properties-file: 'env_inject.txt'
310 # Execute any post build clean-up or testing
311 - shell: '{post_build_script}'
312 # Provided all steps have already passed, push the docker image
313 - shell: !include-raw: ../shell/docker-push.sh
318 - gerrit-trigger-release-manually:
319 server: '{server-name}'
324 name: '{project-name}-{stream}-release-version-docker-daily-no-sonar-cascade-trigger'
325 # Job template for Docker daily release job.
327 # The purpose of this job template is to run "docker build and docker push"
328 # for projects using this template. This job is triggered by the daily build
329 # that builds the artifacts required for building the Docker image.
331 # Required Variables:
332 # branch: git branch (eg. stable/lithium or master)
333 <<: *docker_job_boiler_plate
335 docker_registry: '$DOCKER_REGISTRY:10003'
338 - lf-infra-gerrit-scm:
339 jenkins-ssh-credential: '{jenkins-ssh-credential}'
340 git-url: '$GIT_URL/$PROJECT'
341 refspec: '$GERRIT_REFSPEC'
342 branch: '$GERRIT_BRANCH'
343 submodule-recursive: true
344 submodule-timeout: '{submodule-timeout}'
345 submodule-disable: '{submodule-disable}'
346 choosing-strategy: default
350 - lf-infra-docker-login:
351 global-settings-file: 'global-settings'
352 settings-file: '{mvn-settings}'
353 - shell: '{pre_build_script}'
355 # Docker registry is purposely not using an '_' so as to not conflict
356 # with the Jenkins global env var
357 properties-content: |
358 DOCKER_ARGS={docker_build_args}
359 DOCKER_NAME={docker_name}
360 DOCKER_ROOT={docker_root}
361 DOCKER_TAG={docker_tag}
362 DOCKERREGISTRY={docker_registry}
365 # Do the docker build
366 - shell: !include-raw: ../shell/snapshot-strip.sh
367 - shell: !include-raw: ../shell/docker-build.sh
369 # Import the docker image information from the build step
370 properties-file: 'env_inject.txt'
371 # Execute any post build clean-up or testing
372 - shell: '{post_build_script}'
373 # Provided all steps have already passed, push the docker image
374 - shell: !include-raw: ../shell/docker-push.sh
383 name: '{project-name}-{subproject}-{stream}-merge-docker'
384 # Job template for Docker merge jobs
386 # The purpose of this job template is to run a docker build, and potentially
387 # test validation of the docker image
389 <<: *docker_job_boiler_plate
390 # yamllint disable-line rule:key-duplicates
391 <<: *docker_merge_boiler_plate
395 - lf-infra-docker-login:
396 global-settings-file: 'global-settings'
397 settings-file: '{mvn-settings}'
398 - shell: '{pre_build_script}'
400 # Docker registry is purposely not using an '_' so as to not conflict
401 # with the Jenkins global env var
402 properties-content: |
403 DOCKER_ARGS={docker_build_args}
404 DOCKER_NAME={docker_name}
405 DOCKER_ROOT={docker_root}
406 DOCKER_TAG={docker_tag}
407 DOCKERREGISTRY={docker_registry}
409 # Do the docker build
410 - shell: !include-raw: ../shell/docker-build.sh
412 # Import the docker image information from the build step
413 properties-file: 'env_inject.txt'
414 # Execute any post build clean-up or testing
415 - shell: '{post_build_script}'
416 # Provided all steps have already passed, push the docker image
417 - shell: !include-raw: ../shell/docker-push.sh
420 name: '{project-name}-{subproject}-{stream}-merge-docker-cascade-trigger'
421 # Job template for Docker merge jobs
423 # The purpose of this job template is to run a docker build, and potentially
424 # test validation of the docker image. This job is triggered by the merge job
425 # that builds the artifacts required for building the Docker image.
427 <<: *docker_job_boiler_plate
428 # yamllint disable-line rule:key-duplicates
429 <<: *docker_merge_boiler_plate
433 - lf-infra-docker-login:
434 global-settings-file: 'global-settings'
435 settings-file: '{mvn-settings}'
436 - shell: '{pre_build_script}'
438 # Docker registry is purposely not using an '_' so as to not conflict
439 # with the Jenkins global env var
440 properties-content: |
441 DOCKER_ARGS={docker_build_args}
442 DOCKER_NAME={docker_name}
443 DOCKER_ROOT={docker_root}
444 DOCKER_TAG={docker_tag}
445 DOCKERREGISTRY={docker_registry}
447 # Do the docker build
448 - shell: !include-raw: ../shell/docker-build.sh
450 # Import the docker image information from the build step
451 properties-file: 'env_inject.txt'
452 # Execute any post build clean-up or testing
453 - shell: '{post_build_script}'
454 # Provided all steps have already passed, push the docker image
455 - shell: !include-raw: ../shell/docker-push.sh
463 name: '{project-name}-{subproject}-{stream}-verify-docker'
464 # Job template for Docker verify jobs
466 # The purpose of this job template is to run a docker build, and potentially
467 # test validation of the docker image
469 ######################
470 # Default parameters #
471 ######################
473 <<: *docker_job_boiler_plate
474 # yamllint disable-line rule:key-duplicates
475 <<: *docker_verify_boiler_plate
479 - lf-infra-docker-login:
480 global-settings-file: 'global-settings'
481 settings-file: '{mvn-settings}'
482 - shell: '{pre_build_script}'
484 # Docker registry is purposely not using an '_' so as to not conflict
485 # with the Jenkins global env var
486 properties-content: |
487 DOCKER_ARGS={docker_build_args}
488 DOCKER_NAME={docker_name}
489 DOCKER_ROOT={docker_root}
490 DOCKER_TAG={docker_tag}
491 DOCKERREGISTRY={docker_registry}
493 # Do the docker build
494 - shell: !include-raw: ../shell/docker-build.sh
496 # Import the docker image information from the build step
497 properties-file: 'env_inject.txt'
498 # Execute any post build clean-up or testing
499 - shell: '{post_build_script}'
502 name: '{project-name}-{subproject}-{stream}-verify-docker-cascade-trigger'
503 # Job template for Docker verify jobs
505 # The purpose of this job template is to run a docker build, and potentially
506 # test validation of the docker image
508 ######################
509 # Default parameters #
510 ######################
512 <<: *docker_job_boiler_plate
513 # yamllint disable-line rule:key-duplicates
514 <<: *docker_verify_boiler_plate
518 - lf-infra-docker-login:
519 global-settings-file: 'global-settings'
520 settings-file: '{mvn-settings}'
521 - shell: '{pre_build_script}'
523 # Docker registry is purposely not using an '_' so as to not conflict
524 # with the Jenkins global env var
525 properties-content: |
526 DOCKER_ARGS={docker_build_args}
527 DOCKER_NAME={docker_name}
528 DOCKER_ROOT={docker_root}
529 DOCKER_TAG={docker_tag}
530 DOCKERREGISTRY={docker_registry}
532 # Do the docker build
533 - shell: !include-raw: ../shell/docker-build.sh
535 # Import the docker image information from the build step
536 properties-file: 'env_inject.txt'
537 # Execute any post build clean-up or testing
538 - shell: '{post_build_script}'
546 name: '{project-name}-{subproject}-{stream}-release-version-docker-daily-no-sonar'
547 # Job template for Docker daily release jobs
549 # The purpose of this job template is to run "docker build and docker push"
550 # for projects using this template.
552 # Required Variables:
553 # branch: git branch (eg. stable/lithium or master)
554 <<: *docker_job_boiler_plate
556 docker_registry: '$DOCKER_REGISTRY:10003'
559 - lf-infra-gerrit-scm:
560 jenkins-ssh-credential: '{jenkins-ssh-credential}'
561 git-url: '$GIT_URL/$PROJECT'
562 refspec: '$GERRIT_REFSPEC'
563 branch: '$GERRIT_BRANCH'
564 submodule-recursive: true
565 submodule-timeout: '{submodule-timeout}'
566 submodule-disable: '{submodule-disable}'
567 choosing-strategy: default
571 - lf-infra-docker-login:
572 global-settings-file: 'global-settings'
573 settings-file: '{mvn-settings}'
574 - shell: '{pre_build_script}'
576 # Docker registry is purposely not using an '_' so as to not conflict
577 # with the Jenkins global env var
578 properties-content: |
579 DOCKER_ARGS={docker_build_args}
580 DOCKER_NAME={docker_name}
581 DOCKER_ROOT={docker_root}
582 DOCKER_TAG={docker_tag}
583 DOCKERREGISTRY={docker_registry}
586 # Do the docker build
587 - shell: !include-raw: ../shell/snapshot-strip.sh
588 - shell: !include-raw: ../shell/docker-build.sh
590 # Import the docker image information from the build step
591 properties-file: 'env_inject.txt'
592 # Execute any post build clean-up or testing
593 - shell: '{post_build_script}'
594 # Provided all steps have already passed, push the docker image
595 - shell: !include-raw: ../shell/docker-push.sh
600 - gerrit-trigger-release-manually:
601 server: '{server-name}'
606 name: '{project-name}-{subproject}-{stream}-release-version-docker-daily-no-sonar-cascade-trigger'
607 # Job template for Docker daily release jobs
609 # The purpose of this job template is to run "docker build and docker push"
610 # for projects using this template. This job is triggered by the daily job
611 # that builds the artifacts required for building the Docker image.
613 # Required Variables:
614 # branch: git branch (eg. stable/lithium or master)
615 <<: *docker_job_boiler_plate
617 docker_registry: '$DOCKER_REGISTRY:10003'
620 - lf-infra-gerrit-scm:
621 jenkins-ssh-credential: '{jenkins-ssh-credential}'
622 git-url: '$GIT_URL/$PROJECT'
623 refspec: '$GERRIT_REFSPEC'
624 branch: '$GERRIT_BRANCH'
625 submodule-recursive: true
626 submodule-timeout: '{submodule-timeout}'
627 submodule-disable: '{submodule-disable}'
628 choosing-strategy: default
632 - lf-infra-docker-login:
633 global-settings-file: 'global-settings'
634 settings-file: '{mvn-settings}'
635 - shell: '{pre_build_script}'
637 # Docker registry is purposely not using an '_' so as to not conflict
638 # with the Jenkins global env var
639 properties-content: |
640 DOCKER_ARGS={docker_build_args}
641 DOCKER_NAME={docker_name}
642 DOCKER_ROOT={docker_root}
643 DOCKER_TAG={docker_tag}
644 DOCKERREGISTRY={docker_registry}
647 # Do the docker build
648 - shell: !include-raw: ../shell/snapshot-strip.sh
649 - shell: !include-raw: ../shell/docker-build.sh
651 # Import the docker image information from the build step
652 properties-file: 'env_inject.txt'
653 # Execute any post build clean-up or testing
654 - shell: '{post_build_script}'
655 # Provided all steps have already passed, push the docker image
656 - shell: !include-raw: ../shell/docker-push.sh
665 name: '{project-name}-{subproject}-{stream}-release-version-docker-no-sonar'
666 # Job template for Docker final release job
668 # The purpose of this job template is to run "docker build and docker push"
669 # for projects using this template.
671 # Required Variables:
672 # branch: git branch (eg. stable/lithium or master)
673 <<: *docker_job_boiler_plate
675 docker_registry: '$DOCKER_REGISTRY:10003'
678 - lf-infra-gerrit-scm:
679 jenkins-ssh-credential: '{jenkins-ssh-credential}'
680 git-url: '$GIT_URL/$PROJECT'
681 refspec: '$GERRIT_REFSPEC'
682 branch: '$GERRIT_BRANCH'
683 submodule-recursive: true
684 submodule-timeout: '{submodule-timeout}'
685 submodule-disable: '{submodule-disable}'
686 choosing-strategy: default
690 - lf-infra-docker-login:
691 global-settings-file: 'global-settings'
692 settings-file: '{mvn-settings}'
693 - shell: '{pre_build_script}'
695 # Docker registry is purposely not using an '_' so as to not conflict
696 # with the Jenkins global env var
697 properties-content: |
698 DOCKER_ARGS={docker_build_args}
699 DOCKER_NAME={docker_name}
700 DOCKER_ROOT={docker_root}
701 DOCKER_TAG={docker_tag}
702 DOCKERREGISTRY={docker_registry}
705 # Do the docker build
706 - shell: !include-raw: ../shell/snapshot-strip.sh
707 - shell: !include-raw: ../shell/docker-build.sh
709 # Import the docker image information from the build step
710 properties-file: 'env_inject.txt'
711 # Execute any post build clean-up or testing
712 - shell: '{post_build_script}'
713 # Provided all steps have already passed, push the docker image
714 - shell: !include-raw: ../shell/docker-push.sh
717 name: '{project-name}-{subproject}-{stream}-release-version-docker-cascade-trigger-no-sonar'
718 # Job template for Docker final release job
720 # The purpose of this job template is to run "docker build and docker push"
721 # for projects using this template. This job has no cascading counterpart, because the
722 # final release is moved manually to the release repo.
724 # Required Variables:
725 # branch: git branch (eg. stable/lithium or master)
726 <<: *docker_job_boiler_plate
728 docker_registry: '$DOCKER_REGISTRY:10003'
731 - lf-infra-gerrit-scm:
732 jenkins-ssh-credential: '{jenkins-ssh-credential}'
733 git-url: '$GIT_URL/$PROJECT'
734 refspec: '$GERRIT_REFSPEC'
735 branch: '$GERRIT_BRANCH'
736 submodule-recursive: true
737 submodule-timeout: '{submodule-timeout}'
738 submodule-disable: '{submodule-disable}'
739 choosing-strategy: default
743 - lf-infra-docker-login:
744 global-settings-file: 'global-settings'
745 settings-file: '{mvn-settings}'
746 - shell: '{pre_build_script}'
748 # Docker registry is purposely not using an '_' so as to not conflict
749 # with the Jenkins global env var
750 properties-content: |
751 DOCKER_ARGS={docker_build_args}
752 DOCKER_NAME={docker_name}
753 DOCKER_ROOT={docker_root}
754 DOCKER_TAG={docker_tag}
755 DOCKERREGISTRY={docker_registry}
758 # Do the docker build
759 - shell: !include-raw: ../shell/snapshot-strip.sh
760 - shell: !include-raw: ../shell/docker-build.sh
762 # Import the docker image information from the build step
763 properties-file: 'env_inject.txt'
764 # Execute any post build clean-up or testing
765 - shell: '{post_build_script}'
766 # Provided all steps have already passed, push the docker image
767 - shell: !include-raw: ../shell/docker-push.sh