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-packer-build
58 - config-file-provider:
60 - file-id: '{packer-cloud-settings}'
64 PACKER_PLATFORM={platform}
65 PACKER_TEMPLATE={template}
66 PACKER_VERSION={packer-version}
67 - shell: !include-raw-escape:
68 - ../shell/packer-install.sh
69 - ../shell/packer-build.sh
70 - shell: !include-raw:
71 - ../shell/packer-clear-credentials.sh
74 name: lf-infra-packer-validate
76 - config-file-provider:
78 - file-id: '{packer-cloud-settings}'
82 PACKER_VERSION={packer-version}
83 - shell: !include-raw-escape:
84 - ../shell/packer-install.sh
85 - ../shell/packer-validate.sh
86 - shell: !include-raw:
87 - ../shell/packer-clear-credentials.sh
90 name: lf-infra-push-gerrit-patch
95 GERRIT_COMMIT_MESSAGE='{gerrit-commit-message}'
96 GERRIT_HOST='{gerrit-host}'
97 GERRIT_TOPIC='{gerrit-topic}'
98 GERRIT_USER='{gerrit-user}'
99 REVIEWERS_EMAIL='{reviewers-email}'
100 - shell: !include-raw-escape: ../shell/gerrit-push-patch.sh
103 name: lf-infra-sysstat
105 - shell: !include-raw:
106 - ../shell/sysstat.sh
109 name: lf-jacoco-nojava-workaround
111 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
114 name: lf-infra-deploy-maven-file
117 mvn-version: '{mvn-version}'
118 - lf-provide-maven-settings:
119 global-settings-file: '{global-settings-file}'
120 settings-file: '{settings-file}'
122 properties-content: |
123 MAVEN_REPO_URL={maven-repo-url}
126 UPLOAD_FILES_PATH={upload-files-dir}
127 - shell: !include-raw-escape:
128 - ../shell/lftools-install.sh
129 - ../shell/common-variables.sh
130 - ../shell/deploy-maven-file.sh
131 - lf-provide-maven-settings-cleanup
134 name: lf-maven-install
136 # Create a $HOME/.wgetrc to make the Maven download quiet.
137 - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
139 maven-version: '{mvn-version}'
141 - shell: 'rm "$HOME/.wgetrc"'
144 name: lf-provide-maven-settings
146 - config-file-provider:
148 - file-id: '{global-settings-file}'
149 variable: 'GLOBAL_SETTINGS_FILE'
150 - file-id: '{settings-file}'
151 variable: 'SETTINGS_FILE'
154 name: lf-provide-sigul-configuration
155 # Push configuration files to interact with sigul
157 - config-file-provider:
159 - file-id: sigul-config
160 variable: SIGUL_CONFIG
161 - file-id: sigul-password
162 variable: SIGUL_PASSWORD
165 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
171 properties-content: PIP_PACKAGES={pip-packages}
172 - shell: !include-raw-escape: ../shell/pip-install.sh
175 name: lf-provide-maven-settings-cleanup
179 set +e # DO NOT cause build failure if any of the rm calls fail.
181 rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
183 # In some cases we use the lf-provide-maven-settings macro to produce
184 # a "$HOME/.netrc" file containing credentials. Remove that file here
188 # DO NOT fail build if any of the above lines fail.
192 name: lf-provide-sigul-configuration-cleanup
193 # Clear sigul configuration files after we're done using them
195 - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
198 name: lf-rtd-trigger-build
201 properties-content: |
202 RTD_BUILD_URL={rtd-build-url}
203 RTD_TOKEN={rtd-token}
204 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
210 properties-content: DOC_DIR={doc-dir}
211 - shell: !include-raw-escape:
212 - ../shell/tox-install.sh
213 - ../shell/rtd-verify.sh
216 name: lf-sigul-install
217 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
218 # Environment variable
220 - shell: !include-raw-escape: ../shell/sigul-install.sh
227 name: lf-infra-maven-parameters
231 # Sets an env var for shell scripts to be able to call the dynamically
232 # installed maven without having to calculate the M2_HOME themselves.
233 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
234 description: 'Maven selector to be used by shell scripts'
237 default: '{mvn-opts}'
239 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
242 default: '{mvn-params}'
244 Maven parameters to pass to the mvn command.
247 # Sets an env var for shell scripts to be able to call the dynamically
248 # installed maven without having to calculate the path themselves.
249 # yamllint disable-line rule:line-length
250 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
251 description: 'Maven selector to be used by shell scripts'
253 name: STAGING_PROFILE_ID
254 default: '{staging-profile-id}'
256 Nexus staging profile ID.
260 name: lf-infra-openstack-parameters
264 default: '{os-cloud}'
266 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
267 variable name that is significant to openstack client as a
268 environment variable. Please refer to the documentation for
270 https://docs.openstack.org/developer/python-openstackclient/
274 name: lf-infra-parameters
275 # Standard parameters used in the LF CI environments. Gerrit variables are
276 # not used by GitHub projects, but defining them isn't harmful.
282 Parameter to identify a Gerrit project. This is typically the
283 project repo path as exists in Gerrit.
284 For example: ofextensions/circuitsw
289 Stream is often set to the same name as 'branch' but can
290 sometimes be used as a name representing a project's release code
296 Parameter to identify Gerrit project. This is typically the
297 project repo path as exists in Gerrit.
298 For example: ofextensions/circuitsw
300 Note that Gerrit will override this parameter automatically if a
301 job is triggered by Gerrit.
306 Parameter to identify a Gerrit branch.
308 Note that Gerrit will override this parameter automatically if a
309 job is triggered by Gerrit.
312 default: 'refs/heads/{branch}'
314 Parameter to identify a refspec when pulling from Gerrit.
316 Note that Gerrit will override this parameter automatically if a
317 job is triggered by Gerrit.
319 name: LFTOOLS_VERSION
320 default: '{lftools-version}'
322 Version of lftools to install. Can be a specific version like
323 '0.6.0' or a PEP-440 definition.
324 https://www.python.org/dev/peps/pep-0440/
325 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
328 name: lf-infra-node-parameters
332 default: '{node-dir}'
333 description: Path to a Node project directory.
336 default: '{node-version}'
337 description: Version of NodeJS to install.
340 name: lf-infra-tox-parameters
346 Path to directory containing tox.ini file.
349 default: '{tox-envs}'
351 Tox environments to run build against.
352 Example: docs,py2,py3
359 name: lf-infra-properties
362 # Allow build data to be stored at a length configured by the
363 # downstream project.
364 days-to-keep: '{build-days-to-keep}'
365 # Do not allow artifacts to be stored in Jenkins.
366 artifact-num-to-keep: 0
373 name: lf-jacoco-report
376 exec-pattern: "**/**.exec"
377 class-pattern: "**/classes"
378 source-pattern: "**/src/main/java"
379 # yamllint disable-line rule:line-length
380 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
391 name: lf-infra-publish
392 # lf-infra macro to finish up a build.
394 # Handles the following:
395 # - Shipping logs to Nexus logs site repository
396 # - Cleanup workspace
410 mark-unstable-if-failed: true
413 # Do not clean up *.jenkins-trigger files for jobs that use a
414 # properties file as input for triggering another build.
415 - '**/*.jenkins-trigger'
423 name: lf-infra-gerrit-scm
426 credentials-id: '{jenkins-ssh-credential}'
430 - 'refs/heads/{branch}'
434 recursive: '{submodule-recursive}'
435 choosing-strategy: '{choosing-strategy}'
438 name: lf-infra-github-scm
441 credentials-id: '{jenkins-ssh-credential}'
449 recursive: '{submodule-recursive}'
450 choosing-strategy: '{choosing-strategy}'
457 name: lf-infra-github-pr-trigger
459 - github-pull-request:
460 trigger-phrase: '{trigger-phrase}'
461 only-trigger-phrase: '{only-trigger-phrase}'
462 status-context: '{status-context}'
463 permit-all: '{permit-all}'
464 github-hooks: '{github-hooks}'
465 auto-close-on-fail: false
468 white-list: '{obj:github_pr_whitelist}'
469 admin-list: '{obj:github_pr_admin_list}'
476 name: lf-infra-wrappers
481 timeout: '{build-timeout}'
482 timeout-var: 'BUILD_TIMEOUT'
485 - ssh-agent-credentials:
487 - '{jenkins-ssh-credential}'
490 - config-file-provider:
493 target: '$HOME/.npmrc'
495 target: '$HOME/.config/pip/pip.conf'