7 name: lf-fetch-dependent-patches
9 - shell: !include-raw: ../shell/gerrit-fetch-dependencies.sh
11 properties-file: $WORKSPACE/.dependency.properties
14 name: lf-license-check
18 FILE_PATTERNS={file-patterns}
19 SPDX_DISABLE={spdx-disable}
20 LHC_VERSION={lhc-version}
21 LICENSE_EXCLUDE_PATHS={license-exclude-paths}
22 LICENSES_ALLOWED={licenses-allowed}
23 - shell: !include-raw-escape:
24 - ../shell/license-check.sh
27 name: lf-infra-create-netrc
30 properties-content: 'SERVER_ID={server-id}'
31 - shell: !include-raw-escape: ../shell/create-netrc.sh
34 name: lf-infra-docker-login
36 - lf-provide-maven-settings:
37 global-settings-file: '{global-settings-file}'
38 settings-file: '{settings-file}'
39 - shell: !include-raw-escape: ../shell/docker-login.sh
40 - lf-provide-maven-settings-cleanup
43 name: lf-infra-gpg-verify-git-signature
44 # TODO: Verify signature after downloading users public key from a locally
45 # created repository instead of the public keymesh. This requires a process
46 # in place to get ODL developers public keys into a local repository without
47 # increasing the job thoughput.
49 - shell: !include-raw: ../shell/gpg-verify-git-signature.sh
52 name: lf-infra-pre-build
54 - shell: !include-raw-escape: ../shell/python-tools-install.sh
57 name: lf-infra-ship-logs
59 # Ensure no pre-existing .netrc files are overriding logs config
60 - lf-provide-maven-settings-cleanup
61 - config-file-provider:
63 - file-id: 'jenkins-log-archives-settings'
64 variable: 'SETTINGS_FILE'
65 - lf-infra-create-netrc:
67 - shell: !include-raw:
68 # Ensure python-tools are installed in case job template does not
69 # call the lf-infra-pre-build macro.
70 - ../shell/python-tools-install.sh
71 - ../shell/logs-deploy.sh
72 - shell: !include-raw:
73 - ../shell/logs-clear-credentials.sh
75 regexp: '^Build logs: .*'
78 name: lf-infra-package-listing
80 - shell: !include-raw:
81 - ../shell/package-listing.sh
84 name: lf-infra-packer-build
87 condition-kind: boolean-expression
88 condition-expression: '{openstack}'
90 - config-file-provider:
92 - file-id: clouds-yaml
93 target: '$HOME/.config/openstack/clouds.yaml'
95 properties-content: OS_CLOUD={openstack-cloud}
96 - config-file-provider:
98 - file-id: '{packer-cloud-settings}'
101 properties-content: |
102 PACKER_PLATFORM={platform}
103 PACKER_TEMPLATE={template}
104 PACKER_VERSION={packer-version}
105 - shell: !include-raw-escape:
106 - ../shell/packer-install.sh
107 - ../shell/packer-build.sh
108 - shell: !include-raw:
109 - ../shell/packer-clear-credentials.sh
112 name: lf-infra-packer-validate
115 condition-kind: boolean-expression
116 condition-expression: '{openstack}'
118 - config-file-provider:
120 - file-id: clouds-yaml
121 target: '$HOME/.config/openstack/clouds.yaml'
123 properties-content: OS_CLOUD={openstack-cloud}
124 - config-file-provider:
126 - file-id: '{packer-cloud-settings}'
129 properties-content: |
130 PACKER_VERSION={packer-version}
131 - shell: !include-raw-escape:
132 - ../shell/packer-install.sh
133 - ../shell/packer-validate.sh
134 - shell: !include-raw:
135 - ../shell/packer-clear-credentials.sh
138 name: lf-infra-push-gerrit-patch
141 properties-content: |
143 GERRIT_COMMIT_MESSAGE={gerrit-commit-message}
144 GERRIT_HOST={gerrit-host}
145 GERRIT_TOPIC={gerrit-topic}
146 GERRIT_USER={gerrit-user}
147 REVIEWERS_EMAIL={reviewers-email}
148 - shell: !include-raw-escape: ../shell/gerrit-push-patch.sh
151 name: lf-infra-sysstat
153 - shell: !include-raw:
154 - ../shell/sysstat.sh
157 name: lf-jacoco-nojava-workaround
159 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
162 name: lf-infra-deploy-maven-file
165 mvn-version: '{mvn-version}'
166 - lf-provide-maven-settings:
167 global-settings-file: '{global-settings-file}'
168 settings-file: '{settings-file}'
170 properties-content: |
171 MAVEN_REPO_URL={maven-repo-url}
174 UPLOAD_FILES_PATH={upload-files-dir}
175 - shell: !include-raw-escape:
176 - ../shell/common-variables.sh
177 - ../shell/deploy-maven-file.sh
178 - lf-provide-maven-settings-cleanup
181 name: lf-maven-central
184 condition-kind: boolean-expression
185 condition-expression: '{mvn-central}'
187 - lf-provide-maven-settings:
188 global-settings-file: '{mvn-global-settings}'
189 settings-file: '{mvn-settings}'
190 - lf-infra-create-netrc:
193 properties-content: 'OSSRH_PROFILE_ID={ossrh-profile-id}'
194 - shell: !include-raw-escape: ../shell/maven-central.sh
195 - lf-provide-maven-settings-cleanup
198 name: lf-maven-install
200 # Create a $HOME/.wgetrc to make the Maven download quiet.
201 - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
203 maven-version: '{mvn-version}'
205 - shell: 'rm "$HOME/.wgetrc"'
208 name: lf-provide-maven-settings
210 - config-file-provider:
212 - file-id: '{global-settings-file}'
213 variable: 'GLOBAL_SETTINGS_FILE'
214 - file-id: '{settings-file}'
215 variable: 'SETTINGS_FILE'
221 properties-content: PIP_PACKAGES={pip-packages}
222 - shell: !include-raw-escape: ../shell/pip-install.sh
225 name: lf-provide-maven-settings-cleanup
229 set +e # DO NOT cause build failure if any of the rm calls fail.
231 rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
233 # In some cases we use the lf-provide-maven-settings macro to produce
234 # a "$HOME/.netrc" file containing credentials. Remove that file here
238 # DO NOT fail build if any of the above lines fail.
242 name: lf-rtd-trigger-build
245 properties-content: |
246 RTD_BUILD_URL={rtd-build-url}
247 RTD_TOKEN={rtd-token}
248 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
254 properties-content: DOC_DIR={doc-dir}
255 - shell: !include-raw-escape: ../shell/tox-install.sh
256 - shell: !include-raw-escape: ../shell/rtd-verify.sh
259 name: check-info-votes
262 properties-content: JENKINS_SSH_CREDENTIAL={jenkins-ssh-credential}
263 - shell: !include-raw-escape: ../shell/check-info-votes.sh
266 name: lf-sigul-sign-dir
267 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
268 # Environment variable
271 condition-kind: boolean-expression
272 condition-expression: '{sign-artifacts}'
274 - config-file-provider:
276 - file-id: sigul-config
277 variable: SIGUL_CONFIG
278 - file-id: sigul-password
279 variable: SIGUL_PASSWORD
282 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
283 - shell: !include-raw-escape: ../shell/sigul-install.sh
285 properties-content: |
287 SIGN_MODE={sign-mode}
288 - shell: !include-raw-escape:
289 - ../shell/sigul-sign-dir.sh
290 - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
293 name: lf-infra-provide-docker-cleanup
297 set +e # DO NOT cause build failure if docker rmi fails
298 docker rmi -f $(docker images -a -q)
307 name: lf-clm-parameters
311 default: '{nexus-iq-stage}'
313 Stage the policy evaluation will be run against on the Nexus IQ Server.
316 name: lf-cmake-parameters
317 # Parameters useful in CMake builds.
321 default: '{build-dir}'
322 description: 'Directory to build the project in.'
325 default: '{cmake-opts}'
327 Options to pass to CMAKE.
328 Example: -DCMAKE_INSTALL_PREFIX=$WORKSPACE/target/output
331 default: '{install-prefix}'
332 description: 'Install prefix for C/C++ builds. Example: /usr/local'
335 default: '{make-opts}'
336 description: 'Options to pass to make. Example: -j8'
339 name: lf-infra-maven-parameters
343 # Sets an env var for shell scripts to be able to call the dynamically
344 # installed maven without having to calculate the M2_HOME themselves.
345 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
346 description: 'Maven selector to be used by shell scripts'
349 default: '{mvn-opts}'
351 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
354 default: '{mvn-params}'
356 Maven parameters to pass to the mvn command.
359 # Sets an env var for shell scripts to be able to call the dynamically
360 # installed maven without having to calculate the path themselves.
361 # yamllint disable-line rule:line-length
362 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
363 description: 'Maven selector to be used by shell scripts'
366 name: lf-infra-openstack-parameters
370 default: '{os-cloud}'
372 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
373 variable name that is significant to openstack client as a
374 environment variable. Please refer to the documentation for
376 https://docs.openstack.org/developer/python-openstackclient/
380 name: lf-infra-parameters
381 # Standard parameters used in the LF CI environments. Gerrit variables are
382 # not used by GitHub projects, but defining them isn't harmful.
388 Parameter to identify a SCM project to build. This is typically
389 the project repo path. For example: ofextensions/circuitsw
394 Stream is often set to the same name as 'branch' but can
395 sometimes be used as a name representing a project's release code
401 Gerrit Trigger provided parameter to identify Gerrit project that
402 triggered the build. This is typically the project repo path as
403 exists in Gerrit. For example: ofextensions/circuitsw
405 If using Gerrit, in a manual build this should match the PROJECT
411 Gerrit Trigger provided parameter to identify a Gerrit branch.
413 If using Gerrit, in a manual build override with the branch to
417 default: 'refs/heads/{branch}'
419 Gerrit Trigger provided parameter to identify a refspec to fetch
422 If using Gerrit, in a manual build override with a refspec.
423 https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
424 For example: 'refs/heads/master'
427 default: 'origin/{branch}'
429 GitHub PR Trigger provided parameter for specifying the commit
432 If using GitHub, in a manual build override with a branch path or
433 sha1 hash to a specific commit. For example: 'origin/master'
436 name: lf-infra-node-parameters
440 default: '{node-dir}'
441 description: Path to a Node project directory.
444 default: '{node-version}'
445 description: Version of NodeJS to install.
448 name: lf-infra-tox-parameters
454 Path to directory containing tox.ini file.
457 default: '{tox-envs}'
459 Tox environments to run build against.
460 Example: docs,py2,py3
467 name: lf-infra-properties
470 # Allow build data to be stored at a length configured by the
471 # downstream project.
472 days-to-keep: '{build-days-to-keep}'
473 # Do not allow artifacts to be stored in Jenkins.
474 artifact-num-to-keep: 0
481 name: lf-jacoco-report
484 exec-pattern: "**/**.exec"
485 class-pattern: "**/classes"
486 source-pattern: "**/src/main/java"
487 # yamllint disable-line rule:line-length
488 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
499 name: lf-infra-publish
500 # lf-infra macro to finish up a build.
502 # Handles the following:
503 # - Shipping logs to Nexus logs site repository
504 # - Cleanup workspace
517 - lf-infra-package-listing
519 mark-unstable-if-failed: true
522 # Do not clean up *.jenkins-trigger files for jobs that use a
523 # properties file as input for triggering another build.
524 - '**/*.jenkins-trigger'
528 name: lf-infra-publish-windows
529 # lf-infra macro to finish up a build.
531 # Handles the following:
532 # - Shipping logs to Nexus logs site repository
533 # - Cleanup workspace
535 # TODO: RELENG-1228 Develop log shipping script for Windows systems
546 # - lf-infra-ship-logs-windows
547 # mark-unstable-if-failed: true
550 # Do not clean up *.jenkins-trigger files for jobs that use a
551 # properties file as input for triggering another build.
552 - '**/*.jenkins-trigger'
560 name: lf-infra-gerrit-scm
563 credentials-id: '{jenkins-ssh-credential}'
567 - 'refs/heads/{branch}'
571 recursive: '{submodule-recursive}'
572 timeout: '{submodule-timeout}'
573 choosing-strategy: '{choosing-strategy}'
576 name: lf-infra-github-scm
579 credentials-id: '{jenkins-ssh-credential}'
587 recursive: '{submodule-recursive}'
588 timeout: '{submodule-timeout}'
589 choosing-strategy: '{choosing-strategy}'
596 name: lf-infra-wrappers-common
601 timeout: '{build-timeout}'
602 timeout-var: 'BUILD_TIMEOUT'
609 name: lf-infra-wrappers
611 - lf-infra-wrappers-common:
612 build-timeout: '{build-timeout}'
613 - config-file-provider:
616 target: '$HOME/.npmrc'
618 target: '$HOME/.config/pip/pip.conf'
619 - ssh-agent-credentials:
621 - '{jenkins-ssh-credential}'
624 name: lf-infra-wrappers-windows
626 - lf-infra-wrappers-common:
627 build-timeout: '{build-timeout}'