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-ship-logs
54 - config-file-provider:
56 - file-id: 'jenkins-log-archives-settings'
57 variable: 'SETTINGS_FILE'
58 - lf-infra-create-netrc:
60 - shell: !include-raw:
61 - ../shell/lftools-install.sh
62 - ../shell/logs-deploy.sh
63 - shell: !include-raw:
64 - ../shell/logs-clear-credentials.sh
66 regexp: '^Build logs: .*'
69 name: lf-infra-package-listing
71 - shell: !include-raw:
72 - ../shell/package-listing.sh
75 name: lf-infra-packer-build
77 - config-file-provider:
79 - file-id: '{packer-cloud-settings}'
83 PACKER_PLATFORM={platform}
84 PACKER_TEMPLATE={template}
85 PACKER_VERSION={packer-version}
86 - shell: !include-raw-escape:
87 - ../shell/packer-install.sh
88 - ../shell/packer-build.sh
89 - shell: !include-raw:
90 - ../shell/packer-clear-credentials.sh
93 name: lf-infra-packer-validate
95 - config-file-provider:
97 - file-id: '{packer-cloud-settings}'
100 properties-content: |
101 PACKER_VERSION={packer-version}
102 - shell: !include-raw-escape:
103 - ../shell/packer-install.sh
104 - ../shell/packer-validate.sh
105 - shell: !include-raw:
106 - ../shell/packer-clear-credentials.sh
109 name: lf-infra-push-gerrit-patch
112 properties-content: |
114 GERRIT_COMMIT_MESSAGE={gerrit-commit-message}
115 GERRIT_HOST={gerrit-host}
116 GERRIT_TOPIC={gerrit-topic}
117 GERRIT_USER={gerrit-user}
118 REVIEWERS_EMAIL={reviewers-email}
119 - shell: !include-raw-escape: ../shell/gerrit-push-patch.sh
122 name: lf-infra-sysstat
124 - shell: !include-raw:
125 - ../shell/sysstat.sh
128 name: lf-jacoco-nojava-workaround
130 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
133 name: lf-infra-deploy-maven-file
136 mvn-version: '{mvn-version}'
137 - lf-provide-maven-settings:
138 global-settings-file: '{global-settings-file}'
139 settings-file: '{settings-file}'
141 properties-content: |
142 MAVEN_REPO_URL={maven-repo-url}
145 UPLOAD_FILES_PATH={upload-files-dir}
146 - shell: !include-raw-escape:
147 - ../shell/lftools-install.sh
148 - ../shell/common-variables.sh
149 - ../shell/deploy-maven-file.sh
150 - lf-provide-maven-settings-cleanup
153 name: lf-maven-install
155 # Create a $HOME/.wgetrc to make the Maven download quiet.
156 - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
158 maven-version: '{mvn-version}'
160 - shell: 'rm "$HOME/.wgetrc"'
163 name: lf-provide-maven-settings
165 - config-file-provider:
167 - file-id: '{global-settings-file}'
168 variable: 'GLOBAL_SETTINGS_FILE'
169 - file-id: '{settings-file}'
170 variable: 'SETTINGS_FILE'
173 name: lf-provide-sigul-configuration
174 # Push configuration files to interact with sigul
176 - config-file-provider:
178 - file-id: sigul-config
179 variable: SIGUL_CONFIG
180 - file-id: sigul-password
181 variable: SIGUL_PASSWORD
184 - shell: !include-raw: ../shell/sigul-configuration.sh
190 properties-content: PIP_PACKAGES={pip-packages}
191 - shell: !include-raw-escape: ../shell/pip-install.sh
194 name: lf-provide-maven-settings-cleanup
198 set +e # DO NOT cause build failure if any of the rm calls fail.
200 rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
202 # In some cases we use the lf-provide-maven-settings macro to produce
203 # a "$HOME/.netrc" file containing credentials. Remove that file here
207 # DO NOT fail build if any of the above lines fail.
211 name: lf-provide-sigul-configuration-cleanup
212 # Clear sigul configuration files after we're done using them
214 - shell: !include-raw: ../shell/sigul-configuration-cleanup.sh
217 name: lf-rtd-trigger-build
220 properties-content: |
221 RTD_BUILD_URL={rtd-build-url}
222 RTD_TOKEN={rtd-token}
223 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
229 properties-content: DOC_DIR={doc-dir}
230 - shell: !include-raw-escape:
231 - ../shell/tox-install.sh
232 - ../shell/rtd-verify.sh
235 name: lf-sigul-install
236 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
237 # Environment variable
239 - shell: !include-raw: ../shell/sigul-install.sh
242 name: lf-infra-provide-docker-cleanup
246 set +e # DO NOT cause build failure if docker rmi fails
247 docker rmi -f $(docker images -a -q)
256 name: lf-clm-parameters
260 default: '{nexus-iq-stage}'
262 Stage the policy evaluation will be run against on the Nexus IQ Server.
265 name: lf-cmake-parameters
266 # Parameters useful in CMake builds.
270 default: '{build-dir}'
271 description: 'Directory to build the project in.'
274 default: '{cmake-opts}'
276 Options to pass to CMAKE.
277 Example: -DCMAKE_INSTALL_PREFIX=$WORKSPACE/target/output
280 default: '{install-prefix}'
281 description: 'Install prefix for C/C++ builds. Example: /usr/local'
284 default: '{make-opts}'
285 description: 'Options to pass to make. Example: -j8'
288 name: lf-infra-maven-parameters
292 # Sets an env var for shell scripts to be able to call the dynamically
293 # installed maven without having to calculate the M2_HOME themselves.
294 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
295 description: 'Maven selector to be used by shell scripts'
298 default: '{mvn-opts}'
300 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
303 default: '{mvn-params}'
305 Maven parameters to pass to the mvn command.
308 # Sets an env var for shell scripts to be able to call the dynamically
309 # installed maven without having to calculate the path themselves.
310 # yamllint disable-line rule:line-length
311 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
312 description: 'Maven selector to be used by shell scripts'
315 name: lf-infra-openstack-parameters
319 default: '{os-cloud}'
321 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
322 variable name that is significant to openstack client as a
323 environment variable. Please refer to the documentation for
325 https://docs.openstack.org/developer/python-openstackclient/
329 name: lf-infra-parameters
330 # Standard parameters used in the LF CI environments. Gerrit variables are
331 # not used by GitHub projects, but defining them isn't harmful.
337 Parameter to identify a SCM project to build. This is typically
338 the project repo path. For example: ofextensions/circuitsw
343 Stream is often set to the same name as 'branch' but can
344 sometimes be used as a name representing a project's release code
350 Gerrit Trigger provided parameter to identify Gerrit project that
351 triggered the build. This is typically the project repo path as
352 exists in Gerrit. For example: ofextensions/circuitsw
354 If using Gerrit, in a manual build this should match the PROJECT
360 Gerrit Trigger provided parameter to identify a Gerrit branch.
362 If using Gerrit, in a manual build override with the branch to
366 default: 'refs/heads/{branch}'
368 Gerrit Trigger provided parameter to identify a refspec to fetch
371 If using Gerrit, in a manual build override with a refspec.
372 https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
373 For example: 'refs/heads/master'
376 default: 'origin/{branch}'
378 GitHub PR Trigger provided parameter for specifying the commit
381 If using GitHub, in a manual build override with a branch path or
382 sha1 hash to a specific commit. For example: 'origin/master'
385 name: LFTOOLS_VERSION
386 default: '{lftools-version}'
388 Version of lftools to install. Can be a specific version like
389 '0.6.0' or a PEP-440 definition.
390 https://www.python.org/dev/peps/pep-0440/
391 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
394 name: lf-infra-node-parameters
398 default: '{node-dir}'
399 description: Path to a Node project directory.
402 default: '{node-version}'
403 description: Version of NodeJS to install.
406 name: lf-infra-tox-parameters
412 Path to directory containing tox.ini file.
415 default: '{tox-envs}'
417 Tox environments to run build against.
418 Example: docs,py2,py3
425 name: lf-infra-properties
428 # Allow build data to be stored at a length configured by the
429 # downstream project.
430 days-to-keep: '{build-days-to-keep}'
431 # Do not allow artifacts to be stored in Jenkins.
432 artifact-num-to-keep: 0
439 name: lf-jacoco-report
442 exec-pattern: "**/**.exec"
443 class-pattern: "**/classes"
444 source-pattern: "**/src/main/java"
445 # yamllint disable-line rule:line-length
446 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
457 name: lf-infra-publish
458 # lf-infra macro to finish up a build.
460 # Handles the following:
461 # - Shipping logs to Nexus logs site repository
462 # - Cleanup workspace
475 - lf-infra-package-listing
477 mark-unstable-if-failed: true
480 # Do not clean up *.jenkins-trigger files for jobs that use a
481 # properties file as input for triggering another build.
482 - '**/*.jenkins-trigger'
490 name: lf-infra-gerrit-scm
493 credentials-id: '{jenkins-ssh-credential}'
497 - 'refs/heads/{branch}'
501 recursive: '{submodule-recursive}'
502 choosing-strategy: '{choosing-strategy}'
505 name: lf-infra-github-scm
508 credentials-id: '{jenkins-ssh-credential}'
516 recursive: '{submodule-recursive}'
517 choosing-strategy: '{choosing-strategy}'
524 name: lf-infra-wrappers
529 timeout: '{build-timeout}'
530 timeout-var: 'BUILD_TIMEOUT'
533 - ssh-agent-credentials:
535 - '{jenkins-ssh-credential}'
538 - config-file-provider:
541 target: '$HOME/.npmrc'
543 target: '$HOME/.config/pip/pip.conf'