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: RTD_PROJECT={rtd-project}
202 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
208 properties-content: DOC_DIR={doc-dir}
209 - shell: !include-raw-escape:
210 - ../shell/tox-install.sh
211 - ../shell/rtd-verify.sh
214 name: lf-sigul-install
215 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
216 # Environment variable
218 - shell: !include-raw-escape: ../shell/sigul-install.sh
225 name: lf-infra-maven-parameters
229 # Sets an env var for shell scripts to be able to call the dynamically
230 # installed maven without having to calculate the M2_HOME themselves.
231 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
232 description: 'Maven selector to be used by shell scripts'
235 default: '{mvn-opts}'
237 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
240 default: '{mvn-params}'
242 Maven parameters to pass to the mvn command.
245 # Sets an env var for shell scripts to be able to call the dynamically
246 # installed maven without having to calculate the path themselves.
247 # yamllint disable-line rule:line-length
248 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
249 description: 'Maven selector to be used by shell scripts'
251 name: STAGING_PROFILE_ID
252 default: '{staging-profile-id}'
254 Nexus staging profile ID.
258 name: lf-infra-openstack-parameters
262 default: '{os-cloud}'
264 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
265 variable name that is significant to openstack client as a
266 environment variable. Please refer to the documentation for
268 https://docs.openstack.org/developer/python-openstackclient/
272 name: lf-infra-parameters
273 # Standard parameters used in the LF CI environments. Gerrit variables are
274 # not used by GitHub projects, but defining them isn't harmful.
280 Parameter to identify a Gerrit project. This is typically the
281 project repo path as exists in Gerrit.
282 For example: ofextensions/circuitsw
287 Stream is often set to the same name as 'branch' but can
288 sometimes be used as a name representing a project's release code
294 Parameter to identify Gerrit project. This is typically the
295 project repo path as exists in Gerrit.
296 For example: ofextensions/circuitsw
298 Note that Gerrit will override this parameter automatically if a
299 job is triggered by Gerrit.
304 Parameter to identify a Gerrit branch.
306 Note that Gerrit will override this parameter automatically if a
307 job is triggered by Gerrit.
310 default: 'refs/heads/{branch}'
312 Parameter to identify a refspec when pulling from Gerrit.
314 Note that Gerrit will override this parameter automatically if a
315 job is triggered by Gerrit.
317 name: LFTOOLS_VERSION
318 default: '{lftools-version}'
320 Version of lftools to install. Can be a specific version like
321 '0.6.0' or a PEP-440 definition.
322 https://www.python.org/dev/peps/pep-0440/
323 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
326 name: lf-infra-node-parameters
330 default: '{node-dir}'
331 description: Path to a Node project directory.
334 default: '{node-version}'
335 description: Version of NodeJS to install.
338 name: lf-infra-tox-parameters
344 Path to directory containing tox.ini file.
347 default: '{tox-envs}'
349 Tox environments to run build against.
350 Example: docs,py2,py3
357 name: lf-infra-properties
360 # Allow build data to be stored at a length configured by the
361 # downstream project.
362 days-to-keep: '{build-days-to-keep}'
363 # Do not allow artifacts to be stored in Jenkins.
364 artifact-num-to-keep: 0
371 name: lf-jacoco-report
374 exec-pattern: "**/**.exec"
375 class-pattern: "**/classes"
376 source-pattern: "**/src/main/java"
377 # yamllint disable-line rule:line-length
378 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
389 name: lf-infra-publish
390 # lf-infra macro to finish up a build.
392 # Handles the following:
393 # - Shipping logs to Nexus logs site repository
394 # - Cleanup workspace
408 mark-unstable-if-failed: true
411 # Do not clean up *.jenkins-trigger files for jobs that use a
412 # properties file as input for triggering another build.
413 - '**/*.jenkins-trigger'
421 name: lf-infra-gerrit-scm
424 credentials-id: '{jenkins-ssh-credential}'
428 - 'refs/heads/{branch}'
432 recursive: '{submodule-recursive}'
433 choosing-strategy: '{choosing-strategy}'
436 name: lf-infra-github-scm
439 credentials-id: '{jenkins-ssh-credential}'
447 recursive: '{submodule-recursive}'
448 choosing-strategy: '{choosing-strategy}'
455 name: lf-infra-github-pr-trigger
457 - github-pull-request:
458 trigger-phrase: '{trigger-phrase}'
459 only-trigger-phrase: '{only-trigger-phrase}'
460 status-context: '{status-context}'
461 permit-all: '{permit-all}'
462 github-hooks: '{github-hooks}'
463 auto-close-on-fail: false
466 white-list: '{obj:github_pr_whitelist}'
467 admin-list: '{obj:github_pr_admin_list}'
474 name: lf-infra-wrappers
479 timeout: '{build-timeout}'
480 timeout-var: 'BUILD_TIMEOUT'
483 - ssh-agent-credentials:
485 - '{jenkins-ssh-credential}'
488 - config-file-provider:
491 target: '$HOME/.npmrc'
493 target: '$HOME/.config/pip/pip.conf'