CI!: Create variable for jacoco exclusion pattern
[releng/global-jjb.git] / jjb / lf-macros.yaml
1 ---
2 ############
3 # BUILDERS #
4 ############
5
6 # To take advantage of this macro, have your build write
7 # out the file 'gerrit_comment.txt' with information to post
8 # back to gerrit and include this macro in the list of builders.
9 - builder:
10     name: comment-to-gerrit
11     builders:
12       - shell: !include-raw: ../shell/comment-to-gerrit.sh
13
14 - builder:
15     name: lf-ansible-config-file-provider
16     builders:
17       - config-file-provider:
18           files:
19             - file-id: "ansible-cfg"
20               target: "$HOME/.ansible/ansible.cfg"
21
22 - builder:
23     name: lf-fetch-dependent-patches
24     builders:
25       - shell: !include-raw: ../shell/gerrit-fetch-dependencies.sh
26       - inject:
27           properties-file: $WORKSPACE/.dependency.properties
28
29 - builder:
30     name: lf-license-check
31     builders:
32       - inject:
33           properties-content: |
34             FILE_PATTERNS={file-patterns}
35             SPDX_DISABLE={spdx-disable}
36             LHC_VERSION={lhc-version}
37             LICENSE_EXCLUDE_PATHS={license-exclude-paths}
38             LICENSES_ALLOWED={licenses-allowed}
39       - shell: !include-raw-escape:
40           - ../shell/license-check.sh
41
42 - builder:
43     name: lf-infra-capture-instance-metadata
44     builders:
45       - shell: !include-raw:
46           - ../shell/capture-instance-metadata.sh
47
48 - builder:
49     name: lf-infra-create-netrc
50     builders:
51       - inject:
52           properties-content: "SERVER_ID={server-id}"
53       - shell: !include-raw-escape: ../shell/create-netrc.sh
54
55 - builder:
56     name: lf-infra-docker-login
57     builders:
58       - lf-provide-maven-settings:
59           global-settings-file: "{global-settings-file}"
60           settings-file: "{settings-file}"
61       - shell: !include-raw-escape: ../shell/docker-login.sh
62       - lf-provide-maven-settings-cleanup
63
64 - builder:
65     name: lf-infra-gpg-verify-git-signature
66     # TODO: Verify signature after downloading users public key from a locally
67     # created repository instead of the public keymesh. This requires a process
68     # in place to get ODL developers public keys into a local repository without
69     # increasing the job thoughput.
70     builders:
71       - shell: !include-raw: ../shell/gpg-verify-git-signature.sh
72
73 - builder:
74     name: lf-infra-pre-build
75     builders:
76       - shell: !include-raw-escape: ../shell/python-tools-install.sh
77
78 - builder:
79     name: lf-infra-ship-logs
80     builders:
81       # Ensure no pre-existing .netrc files are overriding logs config
82       - lf-provide-maven-settings-cleanup
83       - config-file-provider:
84           files:
85             - file-id: "jenkins-log-archives-settings"
86               variable: "SETTINGS_FILE"
87       - conditional-step:
88           condition-kind: regex-match
89           regex: "^.*logs-s3.*"
90           label: $S3_BUCKET
91           on-evaluation-failure: dont-run
92           steps:
93             - config-file-provider:
94                 files:
95                   - file-id: "jenkins-s3-log-ship"
96                     target: $HOME/.aws/credentials
97       - lf-infra-create-netrc:
98           server-id: logs
99       - shell: !include-raw:
100           # Ensure python-tools are installed in case job template does not
101           # call the lf-infra-pre-build macro.
102           - ../shell/python-tools-install.sh
103       - shell: !include-raw:
104           - ../shell/sudo-logs.sh
105       - shell: !include-raw:
106           - ../shell/job-cost.sh
107       - shell: !include-raw:
108           - ../shell/logs-deploy.sh
109       - shell: !include-raw:
110           - ../shell/logs-clear-credentials.sh
111       - description-setter:
112           regexp: "(^(Nexus|S3) build logs: .*)"
113
114 - builder:
115     name: lf-infra-package-listing
116     builders:
117       - shell: !include-raw:
118           - ../shell/package-listing.sh
119
120 - builder:
121     name: lf-infra-packer-build
122     builders:
123       - lf-ansible-config-file-provider
124       - conditional-step:
125           condition-kind: boolean-expression
126           condition-expression: "{openstack}"
127           steps:
128             - config-file-provider:
129                 files:
130                   - file-id: clouds-yaml
131                     target: "$HOME/.config/openstack/clouds.yaml"
132             - inject:
133                 properties-content: OS_CLOUD={openstack-cloud}
134       - config-file-provider:
135           files:
136             - file-id: "{packer-cloud-settings}"
137               target: "$HOME/.config/jenkins_jobs/cloud-env.pkrvars.hcl"
138               variable: CLOUDENV
139       - inject:
140           properties-content: |
141             PACKER_BUILDER={packer-builder}
142             PACKER_PLATFORM={platform}
143             PACKER_TEMPLATE={template}
144             PACKER_VERSION={packer-version}
145             UPDATE_CLOUD_IMAGE={update-cloud-image}
146       - shell: !include-raw-escape:
147           - ../shell/packer-install.sh
148           - ../shell/packer-build.sh
149       - shell: !include-raw:
150           - ../shell/packer-clear-credentials.sh
151
152 - builder:
153     name: lf-infra-packer-validate
154     builders:
155       - conditional-step:
156           condition-kind: boolean-expression
157           condition-expression: "{openstack}"
158           steps:
159             - config-file-provider:
160                 files:
161                   - file-id: clouds-yaml
162                     target: "$HOME/.config/openstack/clouds.yaml"
163             - inject:
164                 properties-content: OS_CLOUD={openstack-cloud}
165       - config-file-provider:
166           files:
167             - file-id: "{packer-cloud-settings}"
168               target: "$HOME/.config/jenkins_jobs/cloud-env.pkrvars.hcl"
169               variable: CLOUDENV
170       - inject:
171           properties-content: |
172             PACKER_VERSION={packer-version}
173       - shell: !include-raw-escape:
174           - ../shell/packer-install.sh
175           - ../shell/packer-validate.sh
176       - shell: !include-raw:
177           - ../shell/packer-clear-credentials.sh
178
179 - builder:
180     name: lf-infra-update-packer-images
181     builders:
182       - shell: !include-raw: ../shell/update-cloud-images.sh
183
184 - builder:
185     name: lf-infra-push-gerrit-patch
186     builders:
187       - inject:
188           properties-content: |
189             PROJECT={project}
190             GERRIT_COMMIT_MESSAGE={gerrit-commit-message}
191             GERRIT_HOST={gerrit-host}
192             GERRIT_TOPIC={gerrit-topic}
193             GERRIT_USER={gerrit-user}
194             REVIEWERS_EMAIL={reviewers-email}
195       - shell: !include-raw-escape: ../shell/gerrit-push-patch.sh
196
197 - builder:
198     name: lf-infra-sysstat
199     builders:
200       - shell: !include-raw:
201           - ../shell/sysstat.sh
202
203 - builder:
204     name: lf-jacoco-nojava-workaround
205     builders:
206       - shell: "mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes"
207
208 - builder:
209     name: lf-infra-deploy-maven-file
210     builders:
211       - lf-maven-install:
212           mvn-version: "{mvn-version}"
213       - lf-provide-maven-settings:
214           global-settings-file: "{global-settings-file}"
215           settings-file: "{settings-file}"
216       - inject:
217           properties-content: |
218             MAVEN_REPO_URL={maven-repo-url}
219             REPO_ID={repo-id}
220             GROUP_ID={group-id}
221             UPLOAD_FILES_PATH={upload-files-dir}
222       - shell: !include-raw-escape:
223           - ../shell/common-variables.sh
224           - ../shell/deploy-maven-file.sh
225       - lf-provide-maven-settings-cleanup
226
227 - builder:
228     name: lf-maven-central
229     builders:
230       - conditional-step:
231           condition-kind: boolean-expression
232           condition-expression: "{mvn-central}"
233           steps:
234             - lf-provide-maven-settings:
235                 global-settings-file: "{mvn-global-settings}"
236                 settings-file: "{mvn-settings}"
237             - lf-infra-create-netrc:
238                 server-id: "ossrh"
239             - inject:
240                 properties-content: "OSSRH_PROFILE_ID={ossrh-profile-id}"
241             - shell: !include-raw-escape: ../shell/maven-central.sh
242             - lf-provide-maven-settings-cleanup
243
244 - builder:
245     name: lf-packagecloud-file-provider
246     builders:
247       - config-file-provider:
248           files:
249             - file-id: ".packagecloud"
250               target: "$HOME/.packagecloud"
251       - config-file-provider:
252           files:
253             - file-id: "packagecloud_api"
254               target: "$HOME/packagecloud_api"
255
256 - builder:
257     name: lf-packagecloud-push
258     builders:
259       - inject:
260           properties-content: |
261             BUILD_DIR={build-dir}
262             PACKAGECLOUD_ACCOUNT={packagecloud-account}
263             PACKAGECLOUD_REPO={packagecloud-repo}
264             DEBIAN_DISTRIBUTION_VERSIONS={debian-distribution-versions}
265             RPM_DISTRIBUTION_VERSIONS={rpm-distribution-versions}
266       - shell: !include-raw-escape: ../shell/packagecloud-push.sh
267
268 - builder:
269     name: lf-maven-install
270     builders:
271       # Create a $HOME/.wgetrc to make the Maven download quiet.
272       - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
273       - maven-target:
274           maven-version: "{mvn-version}"
275           goals: "--version"
276       - shell: 'rm "$HOME/.wgetrc"'
277
278 - builder:
279     name: lf-provide-maven-settings
280     builders:
281       - config-file-provider:
282           files:
283             - file-id: "{global-settings-file}"
284               variable: "GLOBAL_SETTINGS_FILE"
285             - file-id: "{settings-file}"
286               variable: "SETTINGS_FILE"
287
288 - builder:
289     name: lf-provide-maven-settings-cleanup
290     builders:
291       - shell: |
292           #!/bin/bash
293           set +e  # DO NOT cause build failure if any of the rm calls fail.
294
295           rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
296
297           # In some cases we use the lf-provide-maven-settings macro to produce
298           # a "$HOME/.netrc" file containing credentials. Remove that file here
299           # too if it exists.
300           rm -f "$HOME/.netrc"
301
302           # DO NOT fail build if any of the above lines fail.
303           exit 0
304
305 - builder:
306     name: lf-rtd-trigger-build
307     builders:
308       - inject:
309           properties-content: |
310             RTD_BUILD_URL={rtd-build-url}
311             RTD_TOKEN={rtd-token}
312       - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
313
314 - builder:
315     name: lf-rtd-verify
316     builders:
317       - inject:
318           properties-content: |
319             DOC_DIR={doc-dir}
320             PYTHON={python-version}
321       - shell: !include-raw-escape: ../shell/tox-install.sh
322       - shell: !include-raw-escape: ../shell/rtd-verify.sh
323
324 - builder:
325     name: lf-rtdv3-build
326     builders:
327       - inject:
328           properties-content: |
329             DEFAULT_VERSION={default-version}
330       - shell: !include-raw-escape: ../shell/rtdv3.sh
331
332 - builder:
333     name: check-info-votes
334     builders:
335       - inject:
336           properties-content: JENKINS_SSH_CREDENTIAL={jenkins-ssh-credential}
337       - shell: !include-raw-escape: ../shell/check-info-votes.sh
338
339 - builder:
340     name: lf-release
341     builders:
342       - config-file-provider:
343           files:
344             - file-id: lftoolsini
345               target: "$HOME/.config/lftools/lftools.ini"
346       - shell: !include-raw: ../shell/release-job.sh
347
348 - builder:
349     name: lf-sigul-sign-dir
350     # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
351     # Environment variable
352     builders:
353       - conditional-step:
354           condition-kind: boolean-expression
355           condition-expression: "{sign-artifacts}"
356           steps:
357             - config-file-provider:
358                 files:
359                   - file-id: sigul-config
360                     variable: SIGUL_CONFIG
361                   - file-id: sigul-password
362                     variable: SIGUL_PASSWORD
363                   - file-id: sigul-pki
364                     variable: SIGUL_PKI
365             - shell: !include-raw-escape: ../shell/sigul-configuration.sh
366             - shell: !include-raw-escape: ../shell/sigul-install.sh
367             - inject:
368                 properties-content: |
369                   SIGN_DIR={sign-dir}
370                   SIGN_MODE={sign-mode}
371             - shell: !include-raw-escape:
372                 - ../shell/sigul-sign-dir.sh
373             - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
374
375 - builder:
376     name: lf-infra-provide-docker-cleanup
377     builders:
378       - shell: |
379           #!/bin/bash
380           set +e  # DO NOT cause build failure if docker rmi fails
381           docker rmi -f $(docker images -a -q)
382           exit 0
383
384 - builder:
385     name: lf-infra-sonar
386     # Run a Sonar Jenkins Plugin
387     builders:
388       - sonar:
389           sonar-name: Sonar
390           scanner-name: SonarQubeScanner
391           task: "{sonar-task}"
392           project: "{sonar-project-file}"
393           properties: "{sonar-properties}"
394           java-opts: "{sonar-java-opts}"
395           additional-arguments: "{sonar-additional-args}"
396
397 - builder:
398     name: lf-infra-sonar-with-prescan
399     # Run a Sonar Jenkins Plugin
400     builders:
401       - lf-sonar-prescan # Must be defined by caller
402       - sonar:
403           sonar-name: Sonar
404           scanner-name: SonarQubeScanner
405           task: "{sonar-task}"
406           project: "{sonar-project-file}"
407           properties: "{sonar-properties}"
408           java-opts: "{sonar-java-opts}"
409           additional-arguments: "{sonar-additional-args}"
410
411 - builder:
412     name: lf-infra-pipeline-verify
413     builders:
414       - shell: !include-raw-escape: ../shell/pipeline-linter.sh
415
416 ##############
417 # PARAMETERS #
418 ##############
419
420 - parameter:
421     name: lf-autotools-parameters
422     # Parameters for configure-make builds.
423     parameters:
424       - string:
425           name: CONFIGURE_OPTS
426           default: "{configure-opts}"
427           description: |
428             Options to pass to configure.
429             Example: --build=i686-pc-linux-gnu
430       - string:
431           name: INSTALL_PREFIX
432           default: "{install-prefix}"
433           description: |
434             Install prefix for configure.
435             Usually a workspace subdirectory.
436       - string:
437           name: MAKE_OPTS
438           default: "{make-opts}"
439           description: |
440             Options to pass to make.
441             Example: -j8 all
442
443 - parameter:
444     name: lf-clm-parameters
445     parameters:
446       - string:
447           name: NEXUS_IQ_STAGE
448           default: "{nexus-iq-stage}"
449           description: |
450             Stage the policy evaluation will be run against on the Nexus IQ Server.
451
452 - parameter:
453     name: lf-cmake-parameters
454     # Parameters useful in CMake builds.
455     parameters:
456       - string:
457           name: BUILD_DIR
458           default: "{build-dir}"
459           description: "Directory to build the project in."
460       - string:
461           name: CMAKE_OPTS
462           default: "{cmake-opts}"
463           description: |
464             Options to pass to CMAKE.
465             Example: -DCMAKE_INSTALL_PREFIX=$WORKSPACE/target/output
466       - string:
467           name: INSTALL_PREFIX
468           default: "{install-prefix}"
469           description: "Install prefix for C/C++ builds. Example: /usr/local"
470       - string:
471           name: MAKE_OPTS
472           default: "{make-opts}"
473           description: "Options to pass to make. Example: -j8"
474
475 - parameter:
476     name: lf-infra-maven-parameters
477     parameters:
478       - string:
479           name: M2_HOME
480           # Sets an env var for shell scripts to be able to call the dynamically
481           # installed maven without having to calculate the M2_HOME themselves.
482           default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}"
483           description: "Maven selector to be used by shell scripts"
484       - string:
485           name: MAVEN_OPTS
486           default: "{mvn-opts}"
487           description: |
488             Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
489       - string:
490           name: MAVEN_PARAMS
491           default: "{mvn-params}"
492           description: |
493             Maven parameters to pass to the mvn command.
494       - string:
495           name: MVN
496           # Sets an env var for shell scripts to be able to call the dynamically
497           # installed maven without having to calculate the path themselves.
498           # yamllint disable-line rule:line-length
499           default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
500           description: "Maven selector to be used by shell scripts"
501
502 - parameter:
503     name: lf-infra-openstack-parameters
504     parameters:
505       - string:
506           name: OS_CLOUD
507           default: "{os-cloud}"
508           description: |
509             The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
510             variable name that is significant to openstack client as a
511             environment variable. Please refer to the documentation for
512             further details.
513             https://docs.openstack.org/developer/python-openstackclient/
514
515 - parameter:
516     name: lf-infra-parameters
517     # Standard parameters used in the LF CI environments. Gerrit variables are
518     # not used by GitHub projects, but defining them isn't harmful.
519     parameters:
520       - string:
521           name: PROJECT
522           default: "{project}"
523           description: |
524             Parameter to identify a SCM project to build. This is typically
525             the project repo path. For example: ofextensions/circuitsw
526       - string:
527           name: STREAM
528           default: "{stream}"
529           description: |
530             Stream is often set to the same name as 'branch' but can
531             sometimes be used as a name representing a project's release code
532             name.
533       - string:
534           name: GERRIT_PROJECT
535           default: "{project}"
536           description: |
537             Gerrit Trigger provided parameter to identify Gerrit project that
538             triggered the build. This is typically the project repo path as
539             exists in Gerrit. For example: ofextensions/circuitsw
540
541             If using Gerrit, in a manual build this should match the PROJECT
542             parameter above.
543       - string:
544           name: GERRIT_BRANCH
545           default: "{branch}"
546           description: |
547             Gerrit Trigger provided parameter to identify a Gerrit branch.
548
549             If using Gerrit, in a manual build override with the branch to
550             build against.
551       - string:
552           name: GERRIT_REFSPEC
553           default: "refs/heads/{branch}"
554           description: |
555             Gerrit Trigger provided parameter to identify a refspec to fetch
556             from Gerrit.
557
558             If using Gerrit, in a manual build override with a refspec.
559             https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
560             For example: 'refs/heads/master'
561       - string:
562           name: sha1
563           default: "origin/{branch}"
564           description: |
565             GitHub PR Trigger provided parameter for specifying the commit
566             to checkout.
567
568             If using GitHub, in a manual build override with a branch path or
569             sha1 hash to a specific commit. For example: 'origin/master'
570
571 - parameter:
572     name: lf-infra-node-parameters
573     parameters:
574       - string:
575           name: NODE_DIR
576           default: "{node-dir}"
577           description: Path to a Node project directory.
578       - string:
579           name: NODE_VERSION
580           default: "{node-version}"
581           description: Version of NodeJS to install.
582
583 - parameter:
584     name: lf-infra-sonar-cli-parameters
585     parameters:
586       - string:
587           name: TOX_DIR
588           default: "{tox-dir}"
589           description: |
590             Path to directory containing tox.ini file.
591       - string:
592           name: TOX_ENVS
593           default: "{tox-envs}"
594           description: |
595             Tox environments to run build against.
596       - string:
597           name: SONAR_SCANNER_VERSION
598           default: "{sonar-scanner-version}"
599           description: |
600             Version of sonar scanner to use.
601             Example: 4.7.0.2747
602       - string:
603           name: SONAR_SCANNER_HOME
604           default: "{sonar-scanner-home}"
605           description: |
606             Sonar scanner home directory.
607             Example: $WORKSPACE/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
608       - string:
609           name: SONAR_SCANNER_OPTS
610           default: "{sonar-scanner-opts}"
611           description: |
612             Sonar scanner Java options.
613             Example: -server
614
615 - parameter:
616     name: lf-infra-tox-parameters
617     parameters:
618       - string:
619           name: TOX_DIR
620           default: "{tox-dir}"
621           description: |
622             Path to directory containing tox.ini file.
623       - string:
624           name: TOX_ENVS
625           default: "{tox-envs}"
626           description: |
627             Tox environments to run build against.
628             Example: docs,py3
629
630 - parameter:
631     name: lf-build-with-parameters-maven-release
632     parameters:
633       - string:
634           name: VERSION
635           default: ""
636           description: "Version to release, for example: 1.0.0"
637       - string:
638           name: GIT_TAG
639           default: ""
640           description: "Tag to push to git repo; optional, defaults to VERSION"
641       - string:
642           name: LOG_DIR
643           default: ""
644           description: "Log dir, for example: project-maven-stage-master/17/"
645       - string:
646           name: OVERRIDE_SEMVER_REGEX
647           default: ""
648           description: "Override Semantic Version (SemVer) Regular Expression. Ex: '.*'"
649       - choice:
650           name: DISTRIBUTION_TYPE
651           choices:
652             - None
653             - container
654             - maven
655           description: "Set to maven for build with parameters"
656       - bool:
657           name: USE_RELEASE_FILE
658           default: "{use-release-file}"
659           description: "Set to False for job built with parameters"
660
661 ##############
662 # PROPERTIES #
663 ##############
664
665 - property:
666     name: lf-infra-properties
667     properties:
668       - build-discarder:
669           # Allow build data to be stored at a length configured by the
670           # downstream project.
671           days-to-keep: "{build-days-to-keep}"
672           # Do not allow artifacts to be stored in Jenkins.
673           artifact-num-to-keep: 0
674
675 ##############
676 # PUBLISHERS #
677 ##############
678
679 - publisher:
680     name: lf-jacoco-report
681     publishers:
682       - jacoco:
683           exec-pattern: "**/**.exec"
684           class-pattern: "**/classes"
685           source-pattern: "**/src/main/java"
686           # yamllint disable-line rule:line-length
687           exclusion-pattern: "{exclude-pattern}"
688           status-update: true
689           targets:
690             - branch:
691                 healthy: 10
692                 unhealthy: 20
693             - method:
694                 healthy: 50
695                 unhealthy: 40
696
697 - publisher:
698     name: lf-infra-publish
699     # lf-infra macro to finish up a build.
700     #
701     # Handles the following:
702     #   - Shipping logs to Nexus logs site repository
703     #   - Cleanup workspace
704     publishers:
705       - postbuildscript:
706           builders:
707             - role: BOTH
708               build-on:
709                 - ABORTED
710                 - FAILURE
711                 - NOT_BUILT
712                 - SUCCESS
713                 - UNSTABLE
714               build-steps:
715                 - lf-infra-sysstat
716                 - lf-infra-package-listing
717                 - lf-infra-capture-instance-metadata
718                 - lf-infra-ship-logs
719           mark-unstable-if-failed: true
720       - workspace-cleanup:
721           exclude:
722             # Do not clean up *.jenkins-trigger files for jobs that use a
723             # properties file as input for triggering another build.
724             - "**/*.jenkins-trigger"
725           fail-build: false
726
727 - publisher:
728     name: lf-infra-publish-windows
729     # lf-infra macro to finish up a build.
730     #
731     # Handles the following:
732     #   - Shipping logs to Nexus logs site repository
733     #   - Cleanup workspace
734     publishers:
735       # TODO: RELENG-1228 Develop log shipping script for Windows systems
736       # - postbuildscript:
737       #     builders:
738       #       - role: BOTH
739       #         build-on:
740       #           - ABORTED
741       #           - FAILURE
742       #           - NOT_BUILT
743       #           - SUCCESS
744       #           - UNSTABLE
745       #         build-steps:
746       #           - lf-infra-ship-logs-windows
747       #     mark-unstable-if-failed: true
748       - workspace-cleanup:
749           exclude:
750             # Do not clean up *.jenkins-trigger files for jobs that use a
751             # properties file as input for triggering another build.
752             - "**/*.jenkins-trigger"
753           fail-build: false
754
755 - publisher:
756     name: global-jjb-email-notification
757     publishers:
758       - email-ext:
759           recipients: "{email-recipients}"
760           reply-to: ""
761           content-type: default
762           subject: "{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!"
763           body: |
764             $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
765
766             Please refer to the logs server URL for console logs when possible
767             and use the Jenkins Build URL as a last resort.
768
769             Jenkins Build URL:
770             $BUILD_URL
771           unstable: true
772           fixed: true
773           send-to:
774             - recipients
775
776 #######
777 # SCM #
778 #######
779
780 - scm:
781     name: lf-infra-gerrit-scm
782     scm:
783       - git:
784           credentials-id: "{jenkins-ssh-credential}"
785           url: "{git-url}"
786           refspec: "{refspec}"
787           branches:
788             - "refs/heads/{branch}"
789           skip-tag: true
790           wipe-workspace: true
791           submodule:
792             disable: "{submodule-disable}"
793             recursive: "{submodule-recursive}"
794             timeout: "{submodule-timeout}"
795           choosing-strategy: "{choosing-strategy}"
796
797 - scm:
798     name: lf-infra-github-scm
799     scm:
800       - git:
801           credentials-id: "{jenkins-ssh-credential}"
802           url: "{url}"
803           refspec: "{refspec}"
804           branches:
805             - "{branch}"
806           skip-tag: true
807           wipe-workspace: true
808           submodule:
809             disable: "{submodule-disable}"
810             recursive: "{submodule-recursive}"
811             timeout: "{submodule-timeout}"
812           choosing-strategy: "{choosing-strategy}"
813
814 ############
815 # WRAPPERS #
816 ############
817
818 - wrapper:
819     name: lf-infra-wrappers-common
820     wrappers:
821       - mask-passwords
822       - timeout:
823           type: absolute
824           timeout: "{build-timeout}"
825           timeout-var: "BUILD_TIMEOUT"
826           fail: true
827       - timestamps
828       - openstack:
829           single-use: true
830
831 - wrapper:
832     name: lf-infra-wrappers
833     wrappers:
834       - lf-infra-wrappers-common:
835           build-timeout: "{build-timeout}"
836       - config-file-provider:
837           files:
838             - file-id: npmrc
839               target: "$HOME/.npmrc"
840             - file-id: pipconf
841               target: "$HOME/.config/pip/pip.conf"
842       - ssh-agent-credentials:
843           users:
844             - "{jenkins-ssh-credential}"
845
846 - wrapper:
847     name: lf-infra-wrappers-windows
848     wrappers:
849       - lf-infra-wrappers-common:
850           build-timeout: "{build-timeout}"