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: RTD_PROJECT={rtd-project}
189 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
195 properties-content: DOC_DIR={doc-dir}
196 - shell: !include-raw-escape:
197 - ../shell/tox-install.sh
198 - ../shell/rtd-verify.sh
201 name: lf-sigul-install
202 # Requires that Jenkins be configured with SIGUL_BRIDGE_IP as a global
203 # Environment variable
205 - shell: !include-raw-escape: ../shell/sigul-install.sh
212 name: lf-infra-maven-parameters
216 # Sets an env var for shell scripts to be able to call the dynamically
217 # installed maven without having to calculate the M2_HOME themselves.
218 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
219 description: 'Maven selector to be used by shell scripts'
222 default: '{mvn-opts}'
224 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
227 default: '{mvn-params}'
229 Maven parameters to pass to the mvn command.
232 # Sets an env var for shell scripts to be able to call the dynamically
233 # installed maven without having to calculate the path themselves.
234 # yamllint disable-line rule:line-length
235 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
236 description: 'Maven selector to be used by shell scripts'
238 name: STAGING_PROFILE_ID
239 default: '{staging-profile-id}'
241 Nexus staging profile ID.
245 name: lf-infra-openstack-parameters
249 default: '{os-cloud}'
251 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
252 variable name that is significant to openstack client as a
253 environment variable. Please refer to the documentation for
255 https://docs.openstack.org/developer/python-openstackclient/
259 name: lf-infra-parameters
260 # Standard parameters used in the LF CI environments. Gerrit variables are
261 # not used by GitHub projects, but defining them isn't harmful.
267 Parameter to identify a Gerrit project. This is typically the
268 project repo path as exists in Gerrit.
269 For example: ofextensions/circuitsw
274 Stream is often set to the same name as 'branch' but can
275 sometimes be used as a name representing a project's release code
281 Parameter to identify Gerrit project. This is typically the
282 project repo path as exists in Gerrit.
283 For example: ofextensions/circuitsw
285 Note that Gerrit will override this parameter automatically if a
286 job is triggered by Gerrit.
291 Parameter to identify a Gerrit branch.
293 Note that Gerrit will override this parameter automatically if a
294 job is triggered by Gerrit.
297 default: 'refs/heads/{branch}'
299 Parameter to identify a refspec when pulling from Gerrit.
301 Note that Gerrit will override this parameter automatically if a
302 job is triggered by Gerrit.
304 name: LFTOOLS_VERSION
305 default: '{lftools-version}'
307 Version of lftools to install. Can be a specific version like
308 '0.6.0' or a PEP-440 definition.
309 https://www.python.org/dev/peps/pep-0440/
310 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
313 name: lf-infra-node-parameters
317 default: '{node-dir}'
318 description: Path to a Node project directory.
321 default: '{node-version}'
322 description: Version of NodeJS to install.
325 name: lf-infra-tox-parameters
331 Path to directory containing tox.ini file.
334 default: '{tox-envs}'
336 Tox environments to run build against.
337 Example: docs,py2,py3
344 name: lf-infra-properties
347 # Allow build data to be stored at a length configured by the
348 # downstream project.
349 days-to-keep: '{build-days-to-keep}'
350 # Do not allow artifacts to be stored in Jenkins.
351 artifact-num-to-keep: 0
358 name: lf-jacoco-report
361 exec-pattern: "**/**.exec"
362 class-pattern: "**/classes"
363 source-pattern: "**/src/main/java"
364 # yamllint disable-line rule:line-length
365 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
376 name: lf-infra-publish
377 # lf-infra macro to finish up a build.
379 # Handles the following:
380 # - Shipping logs to Nexus logs site repository
381 # - Cleanup workspace
387 script-only-if-succeeded: false
388 script-only-if-failed: false
389 mark-unstable-if-failed: false
392 # Do not clean up *.jenkins-trigger files for jobs that use a
393 # properties file as input for triggering another build.
394 - '**/*.jenkins-trigger'
402 name: lf-infra-gerrit-scm
405 credentials-id: '{jenkins-ssh-credential}'
409 - 'refs/heads/{branch}'
413 recursive: '{submodule-recursive}'
414 choosing-strategy: '{choosing-strategy}'
417 name: lf-infra-github-scm
420 credentials-id: '{jenkins-ssh-credential}'
428 recursive: '{submodule-recursive}'
429 choosing-strategy: '{choosing-strategy}'
436 name: lf-infra-github-pr-trigger
438 - github-pull-request:
439 trigger-phrase: '{trigger-phrase}'
440 only-trigger-phrase: '{only-trigger-phrase}'
441 status-context: '{status-context}'
442 permit-all: '{permit-all}'
443 github-hooks: '{github-hooks}'
444 auto-close-on-fail: false
447 white-list: '{obj:github_pr_whitelist}'
448 admin-list: '{obj:github_pr_admin_list}'
455 name: lf-infra-wrappers
460 timeout: '{build-timeout}'
461 timeout-var: 'BUILD_TIMEOUT'
464 - ssh-agent-credentials:
466 - '{jenkins-ssh-credential}'
469 - config-file-provider:
472 target: '$HOME/.npmrc'
474 target: '$HOME/.config/pip/pip.conf'