7 name: lf-fetch-dependent-patches
9 - shell: !include-raw: ../shell/gerrit-fetch-dependencies.sh
11 properties-file: $WORKSPACE/.dependency.properties
14 name: lf-infra-create-netrc
17 properties-content: 'SERVER_ID={server-id}'
18 - shell: !include-raw-escape: ../shell/create-netrc.sh
21 name: lf-infra-docker-login
23 - lf-provide-maven-settings:
24 global-settings-file: '{global-settings-file}'
25 settings-file: '{settings-file}'
26 - shell: !include-raw-escape: ../shell/docker-login.sh
27 - lf-provide-maven-settings-cleanup
30 name: lf-infra-gpg-verify-git-signature
31 # TODO: Verify signature after downloading users public key from a locally
32 # created repository instead of the public keymesh. This requires a process
33 # in place to get ODL developers public keys into a local repository without
34 # increasing the job thoughput.
36 - shell: !include-raw: ../shell/gpg-verify-git-signature.sh
39 name: lf-infra-ship-logs
41 - config-file-provider:
43 - file-id: 'jenkins-log-archives-settings'
44 variable: 'SETTINGS_FILE'
45 - lf-infra-create-netrc:
47 - shell: !include-raw:
48 - ../shell/lftools-install.sh
49 - ../shell/logs-deploy.sh
50 - shell: !include-raw:
51 - ../shell/logs-clear-credentials.sh
53 regexp: '^Build logs: .*'
56 name: lf-infra-package-listing
58 - shell: !include-raw:
59 - ../shell/package-listing.sh
62 name: lf-infra-packer-build
64 - config-file-provider:
66 - file-id: '{packer-cloud-settings}'
70 PACKER_PLATFORM={platform}
71 PACKER_TEMPLATE={template}
72 PACKER_VERSION={packer-version}
73 - shell: !include-raw-escape:
74 - ../shell/packer-install.sh
75 - ../shell/packer-build.sh
76 - shell: !include-raw:
77 - ../shell/packer-clear-credentials.sh
80 name: lf-infra-packer-validate
82 - config-file-provider:
84 - file-id: '{packer-cloud-settings}'
88 PACKER_VERSION={packer-version}
89 - shell: !include-raw-escape:
90 - ../shell/packer-install.sh
91 - ../shell/packer-validate.sh
92 - shell: !include-raw:
93 - ../shell/packer-clear-credentials.sh
96 name: lf-infra-push-gerrit-patch
101 GERRIT_COMMIT_MESSAGE='{gerrit-commit-message}'
102 GERRIT_HOST='{gerrit-host}'
103 GERRIT_TOPIC='{gerrit-topic}'
104 GERRIT_USER='{gerrit-user}'
105 REVIEWERS_EMAIL='{reviewers-email}'
106 - shell: !include-raw-escape: ../shell/gerrit-push-patch.sh
109 name: lf-infra-sysstat
111 - shell: !include-raw:
112 - ../shell/sysstat.sh
115 name: lf-jacoco-nojava-workaround
117 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
120 name: lf-infra-deploy-maven-file
123 mvn-version: '{mvn-version}'
124 - lf-provide-maven-settings:
125 global-settings-file: '{global-settings-file}'
126 settings-file: '{settings-file}'
128 properties-content: |
129 MAVEN_REPO_URL={maven-repo-url}
132 UPLOAD_FILES_PATH={upload-files-dir}
133 - shell: !include-raw-escape:
134 - ../shell/lftools-install.sh
135 - ../shell/common-variables.sh
136 - ../shell/deploy-maven-file.sh
137 - lf-provide-maven-settings-cleanup
140 name: lf-maven-install
142 # Create a $HOME/.wgetrc to make the Maven download quiet.
143 - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
145 maven-version: '{mvn-version}'
147 - shell: 'rm "$HOME/.wgetrc"'
150 name: lf-provide-maven-settings
152 - config-file-provider:
154 - file-id: '{global-settings-file}'
155 variable: 'GLOBAL_SETTINGS_FILE'
156 - file-id: '{settings-file}'
157 variable: 'SETTINGS_FILE'
160 name: lf-provide-sigul-configuration
161 # Push configuration files to interact with sigul
163 - config-file-provider:
165 - file-id: sigul-config
166 variable: SIGUL_CONFIG
167 - file-id: sigul-password
168 variable: SIGUL_PASSWORD
171 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
177 properties-content: PIP_PACKAGES={pip-packages}
178 - shell: !include-raw-escape: ../shell/pip-install.sh
181 name: lf-provide-maven-settings-cleanup
185 set +e # DO NOT cause build failure if any of the rm calls fail.
187 rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
189 # In some cases we use the lf-provide-maven-settings macro to produce
190 # a "$HOME/.netrc" file containing credentials. Remove that file here
194 # DO NOT fail build if any of the above lines fail.
198 name: lf-provide-sigul-configuration-cleanup
199 # Clear sigul configuration files after we're done using them
201 - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
204 name: lf-rtd-trigger-build
207 properties-content: |
208 RTD_BUILD_URL={rtd-build-url}
209 RTD_TOKEN={rtd-token}
210 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
216 properties-content: DOC_DIR={doc-dir}
217 - shell: !include-raw-escape:
218 - ../shell/tox-install.sh
219 - ../shell/rtd-verify.sh
222 name: lf-sigul-install
223 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
224 # Environment variable
226 - shell: !include-raw-escape: ../shell/sigul-install.sh
229 name: lf-infra-provide-docker-cleanup
233 set +e # DO NOT cause build failure if docker rmi fails
234 docker rmi -f $(docker images -a -q)
243 name: lf-infra-maven-parameters
247 # Sets an env var for shell scripts to be able to call the dynamically
248 # installed maven without having to calculate the M2_HOME themselves.
249 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
250 description: 'Maven selector to be used by shell scripts'
253 default: '{mvn-opts}'
255 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
258 default: '{mvn-params}'
260 Maven parameters to pass to the mvn command.
263 # Sets an env var for shell scripts to be able to call the dynamically
264 # installed maven without having to calculate the path themselves.
265 # yamllint disable-line rule:line-length
266 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
267 description: 'Maven selector to be used by shell scripts'
269 name: STAGING_PROFILE_ID
270 default: '{staging-profile-id}'
272 Nexus staging profile ID.
276 name: lf-infra-openstack-parameters
280 default: '{os-cloud}'
282 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
283 variable name that is significant to openstack client as a
284 environment variable. Please refer to the documentation for
286 https://docs.openstack.org/developer/python-openstackclient/
290 name: lf-infra-parameters
291 # Standard parameters used in the LF CI environments. Gerrit variables are
292 # not used by GitHub projects, but defining them isn't harmful.
298 Parameter to identify a SCM project to build. This is typically
299 the project repo path. For example: ofextensions/circuitsw
304 Stream is often set to the same name as 'branch' but can
305 sometimes be used as a name representing a project's release code
311 Gerrit Trigger provided parameter to identify Gerrit project that
312 triggered the build. This is typically the project repo path as
313 exists in Gerrit. For example: ofextensions/circuitsw
315 If using Gerrit, in a manual build this should match the PROJECT
321 Gerrit Trigger provided parameter to identify a Gerrit branch.
323 If using Gerrit, in a manual build override with the branch to
327 default: 'refs/heads/{branch}'
329 Gerrit Trigger provided parameter to identify a refspec to fetch
332 If using Gerrit, in a manual build override with a refspec.
333 https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
334 For example: 'refs/heads/master'
337 default: 'origin/{branch}'
339 GitHub PR Trigger provided parameter for specifying the commit
342 If using GitHub, in a manual build override with a branch path or
343 sha1 hash to a specific commit. For example: 'origin/master'
346 name: LFTOOLS_VERSION
347 default: '{lftools-version}'
349 Version of lftools to install. Can be a specific version like
350 '0.6.0' or a PEP-440 definition.
351 https://www.python.org/dev/peps/pep-0440/
352 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
355 name: lf-infra-node-parameters
359 default: '{node-dir}'
360 description: Path to a Node project directory.
363 default: '{node-version}'
364 description: Version of NodeJS to install.
367 name: lf-infra-tox-parameters
373 Path to directory containing tox.ini file.
376 default: '{tox-envs}'
378 Tox environments to run build against.
379 Example: docs,py2,py3
386 name: lf-infra-properties
389 # Allow build data to be stored at a length configured by the
390 # downstream project.
391 days-to-keep: '{build-days-to-keep}'
392 # Do not allow artifacts to be stored in Jenkins.
393 artifact-num-to-keep: 0
400 name: lf-jacoco-report
403 exec-pattern: "**/**.exec"
404 class-pattern: "**/classes"
405 source-pattern: "**/src/main/java"
406 # yamllint disable-line rule:line-length
407 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
418 name: lf-infra-publish
419 # lf-infra macro to finish up a build.
421 # Handles the following:
422 # - Shipping logs to Nexus logs site repository
423 # - Cleanup workspace
436 - lf-infra-package-listing
438 mark-unstable-if-failed: true
441 # Do not clean up *.jenkins-trigger files for jobs that use a
442 # properties file as input for triggering another build.
443 - '**/*.jenkins-trigger'
451 name: lf-infra-gerrit-scm
454 credentials-id: '{jenkins-ssh-credential}'
458 - 'refs/heads/{branch}'
462 recursive: '{submodule-recursive}'
463 choosing-strategy: '{choosing-strategy}'
466 name: lf-infra-github-scm
469 credentials-id: '{jenkins-ssh-credential}'
477 recursive: '{submodule-recursive}'
478 choosing-strategy: '{choosing-strategy}'
485 name: lf-infra-wrappers
490 timeout: '{build-timeout}'
491 timeout-var: 'BUILD_TIMEOUT'
494 - ssh-agent-credentials:
496 - '{jenkins-ssh-credential}'
499 - config-file-provider:
502 target: '$HOME/.npmrc'
504 target: '$HOME/.config/pip/pip.conf'