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