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 - config-file-provider:
61 - file-id: 'jenkins-log-archives-settings'
62 variable: 'SETTINGS_FILE'
63 - lf-infra-create-netrc:
65 - shell: !include-raw:
66 # Ensure python-tools are installed in case job template does not
67 # call the lf-infra-pre-build macro.
68 - ../shell/python-tools-install.sh
69 - ../shell/logs-deploy.sh
70 - shell: !include-raw:
71 - ../shell/logs-clear-credentials.sh
73 regexp: '^Build logs: .*'
76 name: lf-infra-package-listing
78 - shell: !include-raw:
79 - ../shell/package-listing.sh
82 name: lf-infra-packer-build
85 condition-kind: boolean-expression
86 condition-expression: '{openstack}'
88 - config-file-provider:
90 - file-id: clouds-yaml
91 target: '$HOME/.config/openstack/clouds.yaml'
93 properties-content: OS_CLOUD={openstack-cloud}
94 - config-file-provider:
96 - file-id: '{packer-cloud-settings}'
100 PACKER_PLATFORM={platform}
101 PACKER_TEMPLATE={template}
102 PACKER_VERSION={packer-version}
103 - shell: !include-raw-escape:
104 - ../shell/packer-install.sh
105 - ../shell/packer-build.sh
106 - shell: !include-raw:
107 - ../shell/packer-clear-credentials.sh
110 name: lf-infra-packer-validate
113 condition-kind: boolean-expression
114 condition-expression: '{openstack}'
116 - config-file-provider:
118 - file-id: clouds-yaml
119 target: '$HOME/.config/openstack/clouds.yaml'
121 properties-content: OS_CLOUD={openstack-cloud}
122 - config-file-provider:
124 - file-id: '{packer-cloud-settings}'
127 properties-content: |
128 PACKER_VERSION={packer-version}
129 - shell: !include-raw-escape:
130 - ../shell/packer-install.sh
131 - ../shell/packer-validate.sh
132 - shell: !include-raw:
133 - ../shell/packer-clear-credentials.sh
136 name: lf-infra-push-gerrit-patch
139 properties-content: |
141 GERRIT_COMMIT_MESSAGE={gerrit-commit-message}
142 GERRIT_HOST={gerrit-host}
143 GERRIT_TOPIC={gerrit-topic}
144 GERRIT_USER={gerrit-user}
145 REVIEWERS_EMAIL={reviewers-email}
146 - shell: !include-raw-escape: ../shell/gerrit-push-patch.sh
149 name: lf-infra-sysstat
151 - shell: !include-raw:
152 - ../shell/sysstat.sh
155 name: lf-jacoco-nojava-workaround
157 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
160 name: lf-infra-deploy-maven-file
163 mvn-version: '{mvn-version}'
164 - lf-provide-maven-settings:
165 global-settings-file: '{global-settings-file}'
166 settings-file: '{settings-file}'
168 properties-content: |
169 MAVEN_REPO_URL={maven-repo-url}
172 UPLOAD_FILES_PATH={upload-files-dir}
173 - shell: !include-raw-escape:
174 - ../shell/common-variables.sh
175 - ../shell/deploy-maven-file.sh
176 - lf-provide-maven-settings-cleanup
179 name: lf-maven-central
182 condition-kind: boolean-expression
183 condition-expression: '{mvn-central}'
185 - lf-infra-create-netrc:
188 properties-content: 'OSSRH_PROFILE_ID={ossrh-profile-id}'
189 - shell: !include-raw-escape: ../shell/maven-central.sh
192 name: lf-maven-install
194 # Create a $HOME/.wgetrc to make the Maven download quiet.
195 - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
197 maven-version: '{mvn-version}'
199 - shell: 'rm "$HOME/.wgetrc"'
202 name: lf-provide-maven-settings
204 - config-file-provider:
206 - file-id: '{global-settings-file}'
207 variable: 'GLOBAL_SETTINGS_FILE'
208 - file-id: '{settings-file}'
209 variable: 'SETTINGS_FILE'
215 properties-content: PIP_PACKAGES={pip-packages}
216 - shell: !include-raw-escape: ../shell/pip-install.sh
219 name: lf-provide-maven-settings-cleanup
223 set +e # DO NOT cause build failure if any of the rm calls fail.
225 rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
227 # In some cases we use the lf-provide-maven-settings macro to produce
228 # a "$HOME/.netrc" file containing credentials. Remove that file here
232 # DO NOT fail build if any of the above lines fail.
236 name: lf-rtd-trigger-build
239 properties-content: |
240 RTD_BUILD_URL={rtd-build-url}
241 RTD_TOKEN={rtd-token}
242 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
248 properties-content: DOC_DIR={doc-dir}
249 - shell: !include-raw-escape: ../shell/tox-install.sh
250 - shell: !include-raw-escape: ../shell/rtd-verify.sh
253 name: lf-sigul-sign-dir
254 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
255 # Environment variable
258 condition-kind: boolean-expression
259 condition-expression: '{sign-artifacts}'
261 - config-file-provider:
263 - file-id: sigul-config
264 variable: SIGUL_CONFIG
265 - file-id: sigul-password
266 variable: SIGUL_PASSWORD
269 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
270 - shell: !include-raw-escape: ../shell/sigul-install.sh
272 properties-content: SIGN_DIR={sign-dir}
273 - shell: !include-raw-escape:
274 - ../shell/common-variables.sh
275 - ../shell/sigul-sign-dir.sh
276 - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
279 name: lf-infra-provide-docker-cleanup
283 set +e # DO NOT cause build failure if docker rmi fails
284 docker rmi -f $(docker images -a -q)
293 name: lf-clm-parameters
297 default: '{nexus-iq-stage}'
299 Stage the policy evaluation will be run against on the Nexus IQ Server.
302 name: lf-cmake-parameters
303 # Parameters useful in CMake builds.
307 default: '{build-dir}'
308 description: 'Directory to build the project in.'
311 default: '{cmake-opts}'
313 Options to pass to CMAKE.
314 Example: -DCMAKE_INSTALL_PREFIX=$WORKSPACE/target/output
317 default: '{install-prefix}'
318 description: 'Install prefix for C/C++ builds. Example: /usr/local'
321 default: '{make-opts}'
322 description: 'Options to pass to make. Example: -j8'
325 name: lf-infra-maven-parameters
329 # Sets an env var for shell scripts to be able to call the dynamically
330 # installed maven without having to calculate the M2_HOME themselves.
331 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
332 description: 'Maven selector to be used by shell scripts'
335 default: '{mvn-opts}'
337 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
340 default: '{mvn-params}'
342 Maven parameters to pass to the mvn command.
345 # Sets an env var for shell scripts to be able to call the dynamically
346 # installed maven without having to calculate the path themselves.
347 # yamllint disable-line rule:line-length
348 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
349 description: 'Maven selector to be used by shell scripts'
352 name: lf-infra-openstack-parameters
356 default: '{os-cloud}'
358 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
359 variable name that is significant to openstack client as a
360 environment variable. Please refer to the documentation for
362 https://docs.openstack.org/developer/python-openstackclient/
366 name: lf-infra-parameters
367 # Standard parameters used in the LF CI environments. Gerrit variables are
368 # not used by GitHub projects, but defining them isn't harmful.
374 Parameter to identify a SCM project to build. This is typically
375 the project repo path. For example: ofextensions/circuitsw
380 Stream is often set to the same name as 'branch' but can
381 sometimes be used as a name representing a project's release code
387 Gerrit Trigger provided parameter to identify Gerrit project that
388 triggered the build. This is typically the project repo path as
389 exists in Gerrit. For example: ofextensions/circuitsw
391 If using Gerrit, in a manual build this should match the PROJECT
397 Gerrit Trigger provided parameter to identify a Gerrit branch.
399 If using Gerrit, in a manual build override with the branch to
403 default: 'refs/heads/{branch}'
405 Gerrit Trigger provided parameter to identify a refspec to fetch
408 If using Gerrit, in a manual build override with a refspec.
409 https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
410 For example: 'refs/heads/master'
413 default: 'origin/{branch}'
415 GitHub PR Trigger provided parameter for specifying the commit
418 If using GitHub, in a manual build override with a branch path or
419 sha1 hash to a specific commit. For example: 'origin/master'
422 name: lf-infra-node-parameters
426 default: '{node-dir}'
427 description: Path to a Node project directory.
430 default: '{node-version}'
431 description: Version of NodeJS to install.
434 name: lf-infra-tox-parameters
440 Path to directory containing tox.ini file.
443 default: '{tox-envs}'
445 Tox environments to run build against.
446 Example: docs,py2,py3
453 name: lf-infra-properties
456 # Allow build data to be stored at a length configured by the
457 # downstream project.
458 days-to-keep: '{build-days-to-keep}'
459 # Do not allow artifacts to be stored in Jenkins.
460 artifact-num-to-keep: 0
467 name: lf-jacoco-report
470 exec-pattern: "**/**.exec"
471 class-pattern: "**/classes"
472 source-pattern: "**/src/main/java"
473 # yamllint disable-line rule:line-length
474 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
485 name: lf-infra-publish
486 # lf-infra macro to finish up a build.
488 # Handles the following:
489 # - Shipping logs to Nexus logs site repository
490 # - Cleanup workspace
503 - lf-infra-package-listing
505 mark-unstable-if-failed: true
508 # Do not clean up *.jenkins-trigger files for jobs that use a
509 # properties file as input for triggering another build.
510 - '**/*.jenkins-trigger'
514 name: lf-infra-publish-windows
515 # lf-infra macro to finish up a build.
517 # Handles the following:
518 # - Shipping logs to Nexus logs site repository
519 # - Cleanup workspace
521 # TODO: RELENG-1228 Develop log shipping script for Windows systems
532 # - lf-infra-ship-logs-windows
533 # mark-unstable-if-failed: true
536 # Do not clean up *.jenkins-trigger files for jobs that use a
537 # properties file as input for triggering another build.
538 - '**/*.jenkins-trigger'
546 name: lf-infra-gerrit-scm
549 credentials-id: '{jenkins-ssh-credential}'
553 - 'refs/heads/{branch}'
557 recursive: '{submodule-recursive}'
558 timeout: '{submodule-timeout}'
559 choosing-strategy: '{choosing-strategy}'
562 name: lf-infra-github-scm
565 credentials-id: '{jenkins-ssh-credential}'
573 recursive: '{submodule-recursive}'
574 timeout: '{submodule-timeout}'
575 choosing-strategy: '{choosing-strategy}'
582 name: lf-infra-wrappers-common
587 timeout: '{build-timeout}'
588 timeout-var: 'BUILD_TIMEOUT'
595 name: lf-infra-wrappers
597 - lf-infra-wrappers-common:
598 build-timeout: '{build-timeout}'
599 - config-file-provider:
602 target: '$HOME/.npmrc'
604 target: '$HOME/.config/pip/pip.conf'
605 - ssh-agent-credentials:
607 - '{jenkins-ssh-credential}'
610 name: lf-infra-wrappers-windows
612 - lf-infra-wrappers-common:
613 build-timeout: '{build-timeout}'