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-sysstat
92 - shell: !include-raw:
96 name: lf-jacoco-nojava-workaround
98 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
101 name: lf-infra-deploy-maven-file
104 mvn-version: '{mvn-version}'
105 - lf-provide-maven-settings:
106 global-settings-file: '{global-settings-file}'
107 settings-file: '{settings-file}'
109 properties-content: |
110 MAVEN_REPO_URL={maven-repo-url}
113 UPLOAD_FILES_PATH={upload-files-dir}
114 - shell: !include-raw-escape:
115 - ../shell/lftools-install.sh
116 - ../shell/common-variables.sh
117 - ../shell/deploy-maven-file.sh
118 - lf-provide-maven-settings-cleanup
121 name: lf-maven-install
123 # Create a $HOME/.wgetrc to make the Maven download quiet.
124 - shell: 'echo "quiet=on" > "$HOME/.wgetrc"'
126 maven-version: '{mvn-version}'
128 - shell: 'rm "$HOME/.wgetrc"'
131 name: lf-provide-maven-settings
133 - config-file-provider:
135 - file-id: '{global-settings-file}'
136 variable: 'GLOBAL_SETTINGS_FILE'
137 - file-id: '{settings-file}'
138 variable: 'SETTINGS_FILE'
141 name: lf-provide-sigul-configuration
142 # Push configuration files to interact with sigul
144 - config-file-provider:
146 - file-id: sigul-config
147 variable: SIGUL_CONFIG
148 - file-id: sigul-password
149 variable: SIGUL_PASSWORD
152 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
158 properties-content: PIP_PACKAGES={pip-packages}
159 - shell: !include-raw-escape: ../shell/pip-install.sh
162 name: lf-provide-maven-settings-cleanup
166 set +e # DO NOT cause build failure if any of the rm calls fail.
168 rm -f "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
170 # In some cases we use the lf-provide-maven-settings macro to produce
171 # a "$HOME/.netrc" file containing credentials. Remove that file here
175 # DO NOT fail build if any of the above lines fail.
179 name: lf-provide-sigul-configuration-cleanup
180 # Clear sigul configuration files after we're done using them
182 - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
185 name: lf-rtd-trigger-build
188 properties-content: |
189 RTD_BUILD_URL={rtd-build-url}
190 RTD_TOKEN={rtd-token}
191 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
197 properties-content: DOC_DIR={doc-dir}
198 - shell: !include-raw-escape:
199 - ../shell/tox-install.sh
200 - ../shell/rtd-verify.sh
203 name: lf-sigul-install
204 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
205 # Environment variable
207 - shell: !include-raw-escape: ../shell/sigul-install.sh
214 name: lf-infra-maven-parameters
218 # Sets an env var for shell scripts to be able to call the dynamically
219 # installed maven without having to calculate the M2_HOME themselves.
220 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
221 description: 'Maven selector to be used by shell scripts'
224 default: '{mvn-opts}'
226 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
229 default: '{mvn-params}'
231 Maven parameters to pass to the mvn command.
234 # Sets an env var for shell scripts to be able to call the dynamically
235 # installed maven without having to calculate the path themselves.
236 # yamllint disable-line rule:line-length
237 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
238 description: 'Maven selector to be used by shell scripts'
240 name: STAGING_PROFILE_ID
241 default: '{staging-profile-id}'
243 Nexus staging profile ID.
247 name: lf-infra-openstack-parameters
251 default: '{os-cloud}'
253 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
254 variable name that is significant to openstack client as a
255 environment variable. Please refer to the documentation for
257 https://docs.openstack.org/developer/python-openstackclient/
261 name: lf-infra-parameters
262 # Standard parameters used in the LF CI environments. Gerrit variables are
263 # not used by GitHub projects, but defining them isn't harmful.
269 Parameter to identify a Gerrit project. This is typically the
270 project repo path as exists in Gerrit.
271 For example: ofextensions/circuitsw
276 Stream is often set to the same name as 'branch' but can
277 sometimes be used as a name representing a project's release code
283 Parameter to identify Gerrit project. This is typically the
284 project repo path as exists in Gerrit.
285 For example: ofextensions/circuitsw
287 Note that Gerrit will override this parameter automatically if a
288 job is triggered by Gerrit.
293 Parameter to identify a Gerrit branch.
295 Note that Gerrit will override this parameter automatically if a
296 job is triggered by Gerrit.
299 default: 'refs/heads/{branch}'
301 Parameter to identify a refspec when pulling from Gerrit.
303 Note that Gerrit will override this parameter automatically if a
304 job is triggered by Gerrit.
306 name: LFTOOLS_VERSION
307 default: '{lftools-version}'
309 Version of lftools to install. Can be a specific version like
310 '0.6.0' or a PEP-440 definition.
311 https://www.python.org/dev/peps/pep-0440/
312 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
315 name: lf-infra-node-parameters
319 default: '{node-dir}'
320 description: Path to a Node project directory.
323 default: '{node-version}'
324 description: Version of NodeJS to install.
327 name: lf-infra-tox-parameters
333 Path to directory containing tox.ini file.
336 default: '{tox-envs}'
338 Tox environments to run build against.
339 Example: docs,py2,py3
346 name: lf-infra-properties
349 # Allow build data to be stored at a length configured by the
350 # downstream project.
351 days-to-keep: '{build-days-to-keep}'
352 # Do not allow artifacts to be stored in Jenkins.
353 artifact-num-to-keep: 0
360 name: lf-jacoco-report
363 exec-pattern: "**/**.exec"
364 class-pattern: "**/classes"
365 source-pattern: "**/src/main/java"
366 # yamllint disable-line rule:line-length
367 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
378 name: lf-infra-publish
379 # lf-infra macro to finish up a build.
381 # Handles the following:
382 # - Shipping logs to Nexus logs site repository
383 # - Cleanup workspace
397 mark-unstable-if-failed: true
400 # Do not clean up *.jenkins-trigger files for jobs that use a
401 # properties file as input for triggering another build.
402 - '**/*.jenkins-trigger'
410 name: lf-infra-gerrit-scm
413 credentials-id: '{jenkins-ssh-credential}'
417 - 'refs/heads/{branch}'
421 recursive: '{submodule-recursive}'
422 choosing-strategy: '{choosing-strategy}'
425 name: lf-infra-github-scm
428 credentials-id: '{jenkins-ssh-credential}'
436 recursive: '{submodule-recursive}'
437 choosing-strategy: '{choosing-strategy}'
444 name: lf-infra-github-pr-trigger
446 - github-pull-request:
447 trigger-phrase: '{trigger-phrase}'
448 only-trigger-phrase: '{only-trigger-phrase}'
449 status-context: '{status-context}'
450 permit-all: '{permit-all}'
451 github-hooks: '{github-hooks}'
452 auto-close-on-fail: false
455 white-list: '{obj:github_pr_whitelist}'
456 admin-list: '{obj:github_pr_admin_list}'
463 name: lf-infra-wrappers
468 timeout: '{build-timeout}'
469 timeout-var: 'BUILD_TIMEOUT'
472 - ssh-agent-credentials:
474 - '{jenkins-ssh-credential}'
477 - config-file-provider:
480 target: '$HOME/.npmrc'
482 target: '$HOME/.config/pip/pip.conf'