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-install
181 # Create a $HOME/.wgetrc to make the Maven download quiet.
182 - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
184 maven-version: '{mvn-version}'
186 - shell: 'rm "$HOME/.wgetrc"'
189 name: lf-provide-maven-settings
191 - config-file-provider:
193 - file-id: '{global-settings-file}'
194 variable: 'GLOBAL_SETTINGS_FILE'
195 - file-id: '{settings-file}'
196 variable: 'SETTINGS_FILE'
202 properties-content: PIP_PACKAGES={pip-packages}
203 - shell: !include-raw-escape: ../shell/pip-install.sh
206 name: lf-provide-maven-settings-cleanup
210 set +e # DO NOT cause build failure if any of the rm calls fail.
212 rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
214 # In some cases we use the lf-provide-maven-settings macro to produce
215 # a "$HOME/.netrc" file containing credentials. Remove that file here
219 # DO NOT fail build if any of the above lines fail.
223 name: lf-rtd-trigger-build
226 properties-content: |
227 RTD_BUILD_URL={rtd-build-url}
228 RTD_TOKEN={rtd-token}
229 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
235 properties-content: DOC_DIR={doc-dir}
236 - shell: !include-raw-escape: ../shell/tox-install.sh
237 - shell: !include-raw-escape: ../shell/rtd-verify.sh
240 name: lf-sigul-sign-dir
241 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
242 # Environment variable
245 condition-kind: boolean-expression
246 condition-expression: '{sign-artifacts}'
248 - config-file-provider:
250 - file-id: sigul-config
251 variable: SIGUL_CONFIG
252 - file-id: sigul-password
253 variable: SIGUL_PASSWORD
256 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
257 - shell: !include-raw-escape: ../shell/sigul-install.sh
259 properties-content: SIGN_DIR={sign-dir}
260 - shell: !include-raw-escape:
261 - ../shell/common-variables.sh
262 - ../shell/sigul-sign-dir.sh
263 - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
266 name: lf-infra-provide-docker-cleanup
270 set +e # DO NOT cause build failure if docker rmi fails
271 docker rmi -f $(docker images -a -q)
280 name: lf-clm-parameters
284 default: '{nexus-iq-stage}'
286 Stage the policy evaluation will be run against on the Nexus IQ Server.
289 name: lf-cmake-parameters
290 # Parameters useful in CMake builds.
294 default: '{build-dir}'
295 description: 'Directory to build the project in.'
298 default: '{cmake-opts}'
300 Options to pass to CMAKE.
301 Example: -DCMAKE_INSTALL_PREFIX=$WORKSPACE/target/output
304 default: '{install-prefix}'
305 description: 'Install prefix for C/C++ builds. Example: /usr/local'
308 default: '{make-opts}'
309 description: 'Options to pass to make. Example: -j8'
312 name: lf-infra-maven-parameters
316 # Sets an env var for shell scripts to be able to call the dynamically
317 # installed maven without having to calculate the M2_HOME themselves.
318 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
319 description: 'Maven selector to be used by shell scripts'
322 default: '{mvn-opts}'
324 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
327 default: '{mvn-params}'
329 Maven parameters to pass to the mvn command.
332 # Sets an env var for shell scripts to be able to call the dynamically
333 # installed maven without having to calculate the path themselves.
334 # yamllint disable-line rule:line-length
335 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
336 description: 'Maven selector to be used by shell scripts'
339 name: lf-infra-openstack-parameters
343 default: '{os-cloud}'
345 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
346 variable name that is significant to openstack client as a
347 environment variable. Please refer to the documentation for
349 https://docs.openstack.org/developer/python-openstackclient/
353 name: lf-infra-parameters
354 # Standard parameters used in the LF CI environments. Gerrit variables are
355 # not used by GitHub projects, but defining them isn't harmful.
361 Parameter to identify a SCM project to build. This is typically
362 the project repo path. For example: ofextensions/circuitsw
367 Stream is often set to the same name as 'branch' but can
368 sometimes be used as a name representing a project's release code
374 Gerrit Trigger provided parameter to identify Gerrit project that
375 triggered the build. This is typically the project repo path as
376 exists in Gerrit. For example: ofextensions/circuitsw
378 If using Gerrit, in a manual build this should match the PROJECT
384 Gerrit Trigger provided parameter to identify a Gerrit branch.
386 If using Gerrit, in a manual build override with the branch to
390 default: 'refs/heads/{branch}'
392 Gerrit Trigger provided parameter to identify a refspec to fetch
395 If using Gerrit, in a manual build override with a refspec.
396 https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
397 For example: 'refs/heads/master'
400 default: 'origin/{branch}'
402 GitHub PR Trigger provided parameter for specifying the commit
405 If using GitHub, in a manual build override with a branch path or
406 sha1 hash to a specific commit. For example: 'origin/master'
409 name: lf-infra-node-parameters
413 default: '{node-dir}'
414 description: Path to a Node project directory.
417 default: '{node-version}'
418 description: Version of NodeJS to install.
421 name: lf-infra-tox-parameters
427 Path to directory containing tox.ini file.
430 default: '{tox-envs}'
432 Tox environments to run build against.
433 Example: docs,py2,py3
440 name: lf-infra-properties
443 # Allow build data to be stored at a length configured by the
444 # downstream project.
445 days-to-keep: '{build-days-to-keep}'
446 # Do not allow artifacts to be stored in Jenkins.
447 artifact-num-to-keep: 0
454 name: lf-jacoco-report
457 exec-pattern: "**/**.exec"
458 class-pattern: "**/classes"
459 source-pattern: "**/src/main/java"
460 # yamllint disable-line rule:line-length
461 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
472 name: lf-infra-publish
473 # lf-infra macro to finish up a build.
475 # Handles the following:
476 # - Shipping logs to Nexus logs site repository
477 # - Cleanup workspace
490 - lf-infra-package-listing
492 mark-unstable-if-failed: true
495 # Do not clean up *.jenkins-trigger files for jobs that use a
496 # properties file as input for triggering another build.
497 - '**/*.jenkins-trigger'
501 name: lf-infra-publish-windows
502 # lf-infra macro to finish up a build.
504 # Handles the following:
505 # - Shipping logs to Nexus logs site repository
506 # - Cleanup workspace
508 # TODO: RELENG-1228 Develop log shipping script for Windows systems
519 # - lf-infra-ship-logs-windows
520 # mark-unstable-if-failed: true
523 # Do not clean up *.jenkins-trigger files for jobs that use a
524 # properties file as input for triggering another build.
525 - '**/*.jenkins-trigger'
533 name: lf-infra-gerrit-scm
536 credentials-id: '{jenkins-ssh-credential}'
540 - 'refs/heads/{branch}'
544 recursive: '{submodule-recursive}'
545 timeout: '{submodule-timeout}'
546 choosing-strategy: '{choosing-strategy}'
549 name: lf-infra-github-scm
552 credentials-id: '{jenkins-ssh-credential}'
560 recursive: '{submodule-recursive}'
561 timeout: '{submodule-timeout}'
562 choosing-strategy: '{choosing-strategy}'
569 name: lf-infra-wrappers-common
574 timeout: '{build-timeout}'
575 timeout-var: 'BUILD_TIMEOUT'
582 name: lf-infra-wrappers
584 - lf-infra-wrappers-common:
585 build-timeout: '{build-timeout}'
586 - config-file-provider:
589 target: '$HOME/.npmrc'
591 target: '$HOME/.config/pip/pip.conf'
592 - ssh-agent-credentials:
594 - '{jenkins-ssh-credential}'
597 name: lf-infra-wrappers-windows
599 - lf-infra-wrappers-common:
600 build-timeout: '{build-timeout}'