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 "$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_PROJECT={rtd-project}
190 RTD_BUILD_URL={rtd-build-url}
191 SETTINGS_FILE={global-settings-file}
192 SERVER_ID={rtd-server-id}
193 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
199 properties-content: DOC_DIR={doc-dir}
200 - shell: !include-raw-escape:
201 - ../shell/tox-install.sh
202 - ../shell/rtd-verify.sh
205 name: lf-sigul-install
206 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
207 # Environment variable
209 - shell: !include-raw-escape: ../shell/sigul-install.sh
216 name: lf-infra-maven-parameters
220 # Sets an env var for shell scripts to be able to call the dynamically
221 # installed maven without having to calculate the M2_HOME themselves.
222 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
223 description: 'Maven selector to be used by shell scripts'
226 default: '{mvn-opts}'
228 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
231 default: '{mvn-params}'
233 Maven parameters to pass to the mvn command.
236 # Sets an env var for shell scripts to be able to call the dynamically
237 # installed maven without having to calculate the path themselves.
238 # yamllint disable-line rule:line-length
239 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
240 description: 'Maven selector to be used by shell scripts'
242 name: STAGING_PROFILE_ID
243 default: '{staging-profile-id}'
245 Nexus staging profile ID.
249 name: lf-infra-openstack-parameters
253 default: '{os-cloud}'
255 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
256 variable name that is significant to openstack client as a
257 environment variable. Please refer to the documentation for
259 https://docs.openstack.org/developer/python-openstackclient/
263 name: lf-infra-parameters
264 # Standard parameters used in the LF CI environments. Gerrit variables are
265 # not used by GitHub projects, but defining them isn't harmful.
271 Parameter to identify a Gerrit project. This is typically the
272 project repo path as exists in Gerrit.
273 For example: ofextensions/circuitsw
278 Stream is often set to the same name as 'branch' but can
279 sometimes be used as a name representing a project's release code
285 Parameter to identify Gerrit project. This is typically the
286 project repo path as exists in Gerrit.
287 For example: ofextensions/circuitsw
289 Note that Gerrit will override this parameter automatically if a
290 job is triggered by Gerrit.
295 Parameter to identify a Gerrit branch.
297 Note that Gerrit will override this parameter automatically if a
298 job is triggered by Gerrit.
301 default: 'refs/heads/{branch}'
303 Parameter to identify a refspec when pulling from Gerrit.
305 Note that Gerrit will override this parameter automatically if a
306 job is triggered by Gerrit.
308 name: LFTOOLS_VERSION
309 default: '{lftools-version}'
311 Version of lftools to install. Can be a specific version like
312 '0.6.0' or a PEP-440 definition.
313 https://www.python.org/dev/peps/pep-0440/
314 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
317 name: lf-infra-node-parameters
321 default: '{node-dir}'
322 description: Path to a Node project directory.
325 default: '{node-version}'
326 description: Version of NodeJS to install.
329 name: lf-infra-tox-parameters
335 Path to directory containing tox.ini file.
338 default: '{tox-envs}'
340 Tox environments to run build against.
341 Example: docs,py2,py3
348 name: lf-infra-properties
351 # Allow build data to be stored at a length configured by the
352 # downstream project.
353 days-to-keep: '{build-days-to-keep}'
354 # Do not allow artifacts to be stored in Jenkins.
355 artifact-num-to-keep: 0
362 name: lf-jacoco-report
365 exec-pattern: "**/**.exec"
366 class-pattern: "**/classes"
367 source-pattern: "**/src/main/java"
368 # yamllint disable-line rule:line-length
369 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
380 name: lf-infra-publish
381 # lf-infra macro to finish up a build.
383 # Handles the following:
384 # - Shipping logs to Nexus logs site repository
385 # - Cleanup workspace
399 mark-unstable-if-failed: true
402 # Do not clean up *.jenkins-trigger files for jobs that use a
403 # properties file as input for triggering another build.
404 - '**/*.jenkins-trigger'
412 name: lf-infra-gerrit-scm
415 credentials-id: '{jenkins-ssh-credential}'
419 - 'refs/heads/{branch}'
423 recursive: '{submodule-recursive}'
424 choosing-strategy: '{choosing-strategy}'
427 name: lf-infra-github-scm
430 credentials-id: '{jenkins-ssh-credential}'
438 recursive: '{submodule-recursive}'
439 choosing-strategy: '{choosing-strategy}'
446 name: lf-infra-github-pr-trigger
448 - github-pull-request:
449 trigger-phrase: '{trigger-phrase}'
450 only-trigger-phrase: '{only-trigger-phrase}'
451 status-context: '{status-context}'
452 permit-all: '{permit-all}'
453 github-hooks: '{github-hooks}'
454 auto-close-on-fail: false
457 white-list: '{obj:github_pr_whitelist}'
458 admin-list: '{obj:github_pr_admin_list}'
465 name: lf-infra-wrappers
470 timeout: '{build-timeout}'
471 timeout-var: 'BUILD_TIMEOUT'
474 - ssh-agent-credentials:
476 - '{jenkins-ssh-credential}'
479 - config-file-provider:
482 target: '$HOME/.npmrc'
484 target: '$HOME/.config/pip/pip.conf'