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'
34 - lf-infra-properties:
35 build-days-to-keep: '{build-days-to-keep}'
38 - lf-infra-parameters:
42 lftools-version: '{lftools-version}'
46 build-timeout: '{build-timeout}'
47 jenkins-ssh-credential: '{jenkins-ssh-credential}'
52 - docker_verify_boiler_plate: &docker_verify_boiler_plate
53 name: docker_verify_boiler_plate
59 refspec: '$GERRIT_REFSPEC'
60 choosing-strategy: 'default'
61 submodule-recursive: '{submodule-recursive}'
64 - gerrit-trigger-patch-submitted:
65 status-context: '{project}-Docker-Verify'
66 server: '{server-name}'
71 - docker_merge_boiler_plate: &docker_merge_boiler_plate
72 name: docker_merge_boiler_plate
76 refspec: '$GERRIT_REFSPEC'
77 choosing-strategy: 'default'
78 submodule-recursive: '{submodule-recursive}'
81 - gerrit-trigger-patch-merged:
82 server: '{server-name}'
93 name: '{project-name}-{stream}-merge-docker'
94 # Job template for Docker merge jobs
96 # The purpose of this job template is to run a docker build, and potentially
97 # test validation of the docker image
99 <<: *docker_job_boiler_plate
100 # yamllint disable-line rule:key-duplicates
101 <<: *docker_merge_boiler_plate
104 - lf-infra-docker-login:
105 global-settings-file: 'global-settings'
106 settings-file: '{mvn-settings}'
107 - shell: '{pre_build_script}'
109 # Docker registry is purposely not using an '_' so as to not conflict
110 # with the Jenkins global env var
111 properties-content: |
112 DOCKER_ARGS={docker_build_args}
113 DOCKER_NAME={docker_name}
114 DOCKER_ROOT={docker_root}
115 DOCKER_TAG={docker_tag}
117 DOCKERREGISTRY={docker_registry}
118 # Do the docker build
119 - shell: !include-raw: ../shell/docker-build.sh
121 # Import the docker image information from the build step
122 properties-file: 'env_inject.txt'
123 # Execute any post build clean-up or testing
124 - shell: '{post_build_script}'
125 # Provided all steps have already passed, push the docker image
126 - shell: !include-raw: ../shell/docker-push.sh
129 name: '{project-name}-{stream}-merge-docker-cascade-trigger'
130 # Job template for Docker merge jobs
132 # The purpose of this job template is to run a docker build, and potentially
133 # test validation of the docker image. This job is triggered by the it's corresponding
134 # job that builds the artifacts from which the docker image is built from. Projects
135 # using the {project-name}-{stream}-merge-docker job should move to this job. Because
136 # the {project-name}-{stream}-merge-docker has no garanties that the docker image is built
137 # from merged artifact.
139 <<: *docker_job_boiler_plate
140 # yamllint disable-line rule:key-duplicates
141 <<: *docker_merge_boiler_plate
144 - lf-infra-docker-login:
145 global-settings-file: 'global-settings'
146 settings-file: '{mvn-settings}'
147 - shell: '{pre_build_script}'
149 # Docker registry is purposely not using an '_' so as to not conflict
150 # with the Jenkins global env var
151 properties-content: |
152 DOCKER_ARGS={docker_build_args}
153 DOCKER_NAME={docker_name}
154 DOCKER_ROOT={docker_root}
155 DOCKER_TAG={docker_tag}
157 DOCKERREGISTRY={docker_registry}
158 # Do the docker build
159 - shell: !include-raw: ../shell/docker-build.sh
161 # Import the docker image information from the build step
162 properties-file: 'env_inject.txt'
163 # Execute any post build clean-up or testing
164 - shell: '{post_build_script}'
165 # Provided all steps have already passed, push the docker image
166 - shell: !include-raw: ../shell/docker-push.sh
174 name: '{project-name}-{stream}-verify-docker'
175 # Job template for Docker verify jobs
177 # The purpose of this job template is to run a docker build, and potentially
178 # test validation of the docker image
180 ######################
181 # Default parameters #
182 ######################
184 <<: *docker_job_boiler_plate
185 # yamllint disable-line rule:key-duplicates
186 <<: *docker_verify_boiler_plate
189 - lf-infra-docker-login:
190 global-settings-file: 'global-settings'
191 settings-file: '{mvn-settings}'
192 - shell: '{pre_build_script}'
194 # Docker registry is purposely not using an '_' so as to not conflict
195 # with the Jenkins global env var
196 properties-content: |
197 DOCKER_ARGS={docker_build_args}
198 DOCKER_NAME={docker_name}
199 DOCKER_ROOT={docker_root}
200 DOCKER_TAG={docker_tag}
202 DOCKERREGISTRY={docker_registry}
203 # Do the docker build
204 - shell: !include-raw: ../shell/docker-build.sh
206 # Import the docker image information from the build step
207 properties-file: 'env_inject.txt'
208 # Execute any post build clean-up or testing
209 - shell: '{post_build_script}'
212 name: '{project-name}-{stream}-verify-docker-cascade-trigger'
213 # Job template for Docker verify jobs
215 # The purpose of this job template is to run a docker build, and potentially
216 # test validation of the docker image. This job is triggered by the it's corresponding
217 # job that builds the artifacts from which the docker image is built from. Projects
218 # using the {project-name}-{stream}-verify-docker job should move to this job. Because
219 # the {project-name}-{stream}-verify-docker has no garanties that the docker image is built
220 # from merged artifact.
222 ######################
223 # Default parameters #
224 ######################
226 <<: *docker_job_boiler_plate
227 # yamllint disable-line rule:key-duplicates
228 <<: *docker_verify_boiler_plate
231 - lf-infra-docker-login:
232 global-settings-file: 'global-settings'
233 settings-file: '{mvn-settings}'
234 - shell: '{pre_build_script}'
236 # Docker registry is purposely not using an '_' so as to not conflict
237 # with the Jenkins global env var
238 properties-content: |
239 DOCKER_ARGS={docker_build_args}
240 DOCKER_NAME={docker_name}
241 DOCKER_ROOT={docker_root}
242 DOCKER_TAG={docker_tag}
244 DOCKERREGISTRY={docker_registry}
245 # Do the docker build
246 - shell: !include-raw: ../shell/docker-build.sh
248 # Import the docker image information from the build step
249 properties-file: 'env_inject.txt'
250 # Execute any post build clean-up or testing
251 - shell: '{post_build_script}'
259 name: '{project-name}-{stream}-release-version-docker-daily-no-sonar'
260 # Job template for Docker daily release jobs
262 # The purpose of this job template is to run "docker build and docker push"
263 # for projects using this template.
265 # Required Variables:
266 # branch: git branch (eg. stable/lithium or master)
267 <<: *docker_job_boiler_plate
269 docker_registry: '$DOCKER_REGISTRY:10003'
272 - lf-infra-gerrit-scm:
273 jenkins-ssh-credential: '{jenkins-ssh-credential}'
274 git-url: '$GIT_URL/$PROJECT'
275 refspec: '$GERRIT_REFSPEC'
276 branch: '$GERRIT_BRANCH'
277 submodule-recursive: true
278 submodule-timeout: '{submodule-timeout}'
279 choosing-strategy: default
282 - lf-infra-docker-login:
283 global-settings-file: 'global-settings'
284 settings-file: '{mvn-settings}'
285 - shell: '{pre_build_script}'
287 # Docker registry is purposely not using an '_' so as to not conflict
288 # with the Jenkins global env var
289 properties-content: |
290 DOCKER_ARGS={docker_build_args}
291 DOCKER_NAME={docker_name}
292 DOCKER_ROOT={docker_root}
293 DOCKER_TAG={docker_tag}
294 DOCKERREGISTRY={docker_registry}
297 # Do the docker build
298 - shell: !include-raw: ../shell/snapshot-strip.sh
299 - shell: !include-raw: ../shell/docker-build.sh
301 # Import the docker image information from the build step
302 properties-file: 'env_inject.txt'
303 # Execute any post build clean-up or testing
304 - shell: '{post_build_script}'
305 # Provided all steps have already passed, push the docker image
306 - shell: !include-raw: ../shell/docker-push.sh
311 - gerrit-trigger-release-manually:
312 server: '{server-name}'
317 name: '{project-name}-{stream}-release-version-docker-daily-no-sonar-cascade-trigger'
318 # Job template for Docker daily release job.
320 # The purpose of this job template is to run "docker build and docker push"
321 # for projects using this template. This job is triggered by the daily build
322 # that builds the artifacts required for building the Docker image.
324 # Required Variables:
325 # branch: git branch (eg. stable/lithium or master)
326 <<: *docker_job_boiler_plate
328 docker_registry: '$DOCKER_REGISTRY:10003'
331 - lf-infra-gerrit-scm:
332 jenkins-ssh-credential: '{jenkins-ssh-credential}'
333 git-url: '$GIT_URL/$PROJECT'
334 refspec: '$GERRIT_REFSPEC'
335 branch: '$GERRIT_BRANCH'
336 submodule-recursive: true
337 submodule-timeout: '{submodule-timeout}'
338 choosing-strategy: default
341 - lf-infra-docker-login:
342 global-settings-file: 'global-settings'
343 settings-file: '{mvn-settings}'
344 - shell: '{pre_build_script}'
346 # Docker registry is purposely not using an '_' so as to not conflict
347 # with the Jenkins global env var
348 properties-content: |
349 DOCKER_ARGS={docker_build_args}
350 DOCKER_NAME={docker_name}
351 DOCKER_ROOT={docker_root}
352 DOCKER_TAG={docker_tag}
353 DOCKERREGISTRY={docker_registry}
356 # Do the docker build
357 - shell: !include-raw: ../shell/snapshot-strip.sh
358 - shell: !include-raw: ../shell/docker-build.sh
360 # Import the docker image information from the build step
361 properties-file: 'env_inject.txt'
362 # Execute any post build clean-up or testing
363 - shell: '{post_build_script}'
364 # Provided all steps have already passed, push the docker image
365 - shell: !include-raw: ../shell/docker-push.sh
374 name: '{project-name}-{subproject}-{stream}-merge-docker'
375 # Job template for Docker merge jobs
377 # The purpose of this job template is to run a docker build, and potentially
378 # test validation of the docker image
380 <<: *docker_job_boiler_plate
381 # yamllint disable-line rule:key-duplicates
382 <<: *docker_merge_boiler_plate
385 - lf-infra-docker-login:
386 global-settings-file: 'global-settings'
387 settings-file: '{mvn-settings}'
388 - shell: '{pre_build_script}'
390 # Docker registry is purposely not using an '_' so as to not conflict
391 # with the Jenkins global env var
392 properties-content: |
393 DOCKER_ARGS={docker_build_args}
394 DOCKER_NAME={docker_name}
395 DOCKER_ROOT={docker_root}
396 DOCKER_TAG={docker_tag}
397 DOCKERREGISTRY={docker_registry}
399 # Do the docker build
400 - shell: !include-raw: ../shell/docker-build.sh
402 # Import the docker image information from the build step
403 properties-file: 'env_inject.txt'
404 # Execute any post build clean-up or testing
405 - shell: '{post_build_script}'
406 # Provided all steps have already passed, push the docker image
407 - shell: !include-raw: ../shell/docker-push.sh
410 name: '{project-name}-{subproject}-{stream}-merge-docker-cascade-trigger'
411 # Job template for Docker merge jobs
413 # The purpose of this job template is to run a docker build, and potentially
414 # test validation of the docker image. This job is triggered by the merge job
415 # that builds the artifacts required for building the Docker image.
417 <<: *docker_job_boiler_plate
418 # yamllint disable-line rule:key-duplicates
419 <<: *docker_merge_boiler_plate
422 - lf-infra-docker-login:
423 global-settings-file: 'global-settings'
424 settings-file: '{mvn-settings}'
425 - shell: '{pre_build_script}'
427 # Docker registry is purposely not using an '_' so as to not conflict
428 # with the Jenkins global env var
429 properties-content: |
430 DOCKER_ARGS={docker_build_args}
431 DOCKER_NAME={docker_name}
432 DOCKER_ROOT={docker_root}
433 DOCKER_TAG={docker_tag}
434 DOCKERREGISTRY={docker_registry}
436 # Do the docker build
437 - shell: !include-raw: ../shell/docker-build.sh
439 # Import the docker image information from the build step
440 properties-file: 'env_inject.txt'
441 # Execute any post build clean-up or testing
442 - shell: '{post_build_script}'
443 # Provided all steps have already passed, push the docker image
444 - shell: !include-raw: ../shell/docker-push.sh
452 name: '{project-name}-{subproject}-{stream}-verify-docker'
453 # Job template for Docker verify jobs
455 # The purpose of this job template is to run a docker build, and potentially
456 # test validation of the docker image
458 ######################
459 # Default parameters #
460 ######################
462 <<: *docker_job_boiler_plate
463 # yamllint disable-line rule:key-duplicates
464 <<: *docker_verify_boiler_plate
467 - lf-infra-docker-login:
468 global-settings-file: 'global-settings'
469 settings-file: '{mvn-settings}'
470 - shell: '{pre_build_script}'
472 # Docker registry is purposely not using an '_' so as to not conflict
473 # with the Jenkins global env var
474 properties-content: |
475 DOCKER_ARGS={docker_build_args}
476 DOCKER_NAME={docker_name}
477 DOCKER_ROOT={docker_root}
478 DOCKER_TAG={docker_tag}
479 DOCKERREGISTRY={docker_registry}
481 # Do the docker build
482 - shell: !include-raw: ../shell/docker-build.sh
484 # Import the docker image information from the build step
485 properties-file: 'env_inject.txt'
486 # Execute any post build clean-up or testing
487 - shell: '{post_build_script}'
490 name: '{project-name}-{subproject}-{stream}-verify-docker-cascade-trigger'
491 # Job template for Docker verify jobs
493 # The purpose of this job template is to run a docker build, and potentially
494 # test validation of the docker image
496 ######################
497 # Default parameters #
498 ######################
500 <<: *docker_job_boiler_plate
501 # yamllint disable-line rule:key-duplicates
502 <<: *docker_verify_boiler_plate
505 - lf-infra-docker-login:
506 global-settings-file: 'global-settings'
507 settings-file: '{mvn-settings}'
508 - shell: '{pre_build_script}'
510 # Docker registry is purposely not using an '_' so as to not conflict
511 # with the Jenkins global env var
512 properties-content: |
513 DOCKER_ARGS={docker_build_args}
514 DOCKER_NAME={docker_name}
515 DOCKER_ROOT={docker_root}
516 DOCKER_TAG={docker_tag}
517 DOCKERREGISTRY={docker_registry}
519 # Do the docker build
520 - shell: !include-raw: ../shell/docker-build.sh
522 # Import the docker image information from the build step
523 properties-file: 'env_inject.txt'
524 # Execute any post build clean-up or testing
525 - shell: '{post_build_script}'
533 name: '{project-name}-{subproject}-{stream}-release-version-docker-daily-no-sonar'
534 # Job template for Docker daily release jobs
536 # The purpose of this job template is to run "docker build and docker push"
537 # for projects using this template.
539 # Required Variables:
540 # branch: git branch (eg. stable/lithium or master)
541 <<: *docker_job_boiler_plate
543 docker_registry: '$DOCKER_REGISTRY:10003'
546 - lf-infra-gerrit-scm:
547 jenkins-ssh-credential: '{jenkins-ssh-credential}'
548 git-url: '$GIT_URL/$PROJECT'
549 refspec: '$GERRIT_REFSPEC'
550 branch: '$GERRIT_BRANCH'
551 submodule-recursive: true
552 submodule-timeout: '{submodule-timeout}'
553 choosing-strategy: default
556 - lf-infra-docker-login:
557 global-settings-file: 'global-settings'
558 settings-file: '{mvn-settings}'
559 - shell: '{pre_build_script}'
561 # Docker registry is purposely not using an '_' so as to not conflict
562 # with the Jenkins global env var
563 properties-content: |
564 DOCKER_ARGS={docker_build_args}
565 DOCKER_NAME={docker_name}
566 DOCKER_ROOT={docker_root}
567 DOCKER_TAG={docker_tag}
568 DOCKERREGISTRY={docker_registry}
571 # Do the docker build
572 - shell: !include-raw: ../shell/snapshot-strip.sh
573 - shell: !include-raw: ../shell/docker-build.sh
575 # Import the docker image information from the build step
576 properties-file: 'env_inject.txt'
577 # Execute any post build clean-up or testing
578 - shell: '{post_build_script}'
579 # Provided all steps have already passed, push the docker image
580 - shell: !include-raw: ../shell/docker-push.sh
585 - gerrit-trigger-release-manually:
586 server: '{server-name}'
591 name: '{project-name}-{subproject}-{stream}-release-version-docker-daily-no-sonar-cascade-trigger'
592 # Job template for Docker daily release jobs
594 # The purpose of this job template is to run "docker build and docker push"
595 # for projects using this template. This job is triggered by the daily job
596 # that builds the artifacts required for building the Docker image.
598 # Required Variables:
599 # branch: git branch (eg. stable/lithium or master)
600 <<: *docker_job_boiler_plate
602 docker_registry: '$DOCKER_REGISTRY:10003'
605 - lf-infra-gerrit-scm:
606 jenkins-ssh-credential: '{jenkins-ssh-credential}'
607 git-url: '$GIT_URL/$PROJECT'
608 refspec: '$GERRIT_REFSPEC'
609 branch: '$GERRIT_BRANCH'
610 submodule-recursive: true
611 submodule-timeout: '{submodule-timeout}'
612 choosing-strategy: default
615 - lf-infra-docker-login:
616 global-settings-file: 'global-settings'
617 settings-file: '{mvn-settings}'
618 - shell: '{pre_build_script}'
620 # Docker registry is purposely not using an '_' so as to not conflict
621 # with the Jenkins global env var
622 properties-content: |
623 DOCKER_ARGS={docker_build_args}
624 DOCKER_NAME={docker_name}
625 DOCKER_ROOT={docker_root}
626 DOCKER_TAG={docker_tag}
627 DOCKERREGISTRY={docker_registry}
630 # Do the docker build
631 - shell: !include-raw: ../shell/snapshot-strip.sh
632 - shell: !include-raw: ../shell/docker-build.sh
634 # Import the docker image information from the build step
635 properties-file: 'env_inject.txt'
636 # Execute any post build clean-up or testing
637 - shell: '{post_build_script}'
638 # Provided all steps have already passed, push the docker image
639 - shell: !include-raw: ../shell/docker-push.sh
648 name: '{project-name}-{subproject}-{stream}-release-version-docker-no-sonar'
649 # Job template for Docker final release job
651 # The purpose of this job template is to run "docker build and docker push"
652 # for projects using this template.
654 # Required Variables:
655 # branch: git branch (eg. stable/lithium or master)
656 <<: *docker_job_boiler_plate
658 docker_registry: '$DOCKER_REGISTRY:10003'
661 - lf-infra-gerrit-scm:
662 jenkins-ssh-credential: '{jenkins-ssh-credential}'
663 git-url: '$GIT_URL/$PROJECT'
664 refspec: '$GERRIT_REFSPEC'
665 branch: '$GERRIT_BRANCH'
666 submodule-recursive: true
667 submodule-timeout: '{submodule-timeout}'
668 choosing-strategy: default
671 - lf-infra-docker-login:
672 global-settings-file: 'global-settings'
673 settings-file: '{mvn-settings}'
674 - shell: '{pre_build_script}'
676 # Docker registry is purposely not using an '_' so as to not conflict
677 # with the Jenkins global env var
678 properties-content: |
679 DOCKER_ARGS={docker_build_args}
680 DOCKER_NAME={docker_name}
681 DOCKER_ROOT={docker_root}
682 DOCKER_TAG={docker_tag}
683 DOCKERREGISTRY={docker_registry}
686 # Do the docker build
687 - shell: !include-raw: ../shell/snapshot-strip.sh
688 - shell: !include-raw: ../shell/docker-build.sh
690 # Import the docker image information from the build step
691 properties-file: 'env_inject.txt'
692 # Execute any post build clean-up or testing
693 - shell: '{post_build_script}'
694 # Provided all steps have already passed, push the docker image
695 - shell: !include-raw: ../shell/docker-push.sh
698 name: '{project-name}-{subproject}-{stream}-release-version-docker-cascade-trigger-no-sonar'
699 # Job template for Docker final release job
701 # The purpose of this job template is to run "docker build and docker push"
702 # for projects using this template. This job has no cascading counterpart, because the
703 # final release is moved manually to the release repo.
705 # Required Variables:
706 # branch: git branch (eg. stable/lithium or master)
707 <<: *docker_job_boiler_plate
709 docker_registry: '$DOCKER_REGISTRY:10003'
712 - lf-infra-gerrit-scm:
713 jenkins-ssh-credential: '{jenkins-ssh-credential}'
714 git-url: '$GIT_URL/$PROJECT'
715 refspec: '$GERRIT_REFSPEC'
716 branch: '$GERRIT_BRANCH'
717 submodule-recursive: true
718 submodule-timeout: '{submodule-timeout}'
719 choosing-strategy: default
722 - lf-infra-docker-login:
723 global-settings-file: 'global-settings'
724 settings-file: '{mvn-settings}'
725 - shell: '{pre_build_script}'
727 # Docker registry is purposely not using an '_' so as to not conflict
728 # with the Jenkins global env var
729 properties-content: |
730 DOCKER_ARGS={docker_build_args}
731 DOCKER_NAME={docker_name}
732 DOCKER_ROOT={docker_root}
733 DOCKER_TAG={docker_tag}
734 DOCKERREGISTRY={docker_registry}
737 # Do the docker build
738 - shell: !include-raw: ../shell/snapshot-strip.sh
739 - shell: !include-raw: ../shell/docker-build.sh
741 # Import the docker image information from the build step
742 properties-file: 'env_inject.txt'
743 # Execute any post build clean-up or testing
744 - shell: '{post_build_script}'
745 # Provided all steps have already passed, push the docker image
746 - shell: !include-raw: ../shell/docker-push.sh