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'
144 properties-content: PIP_PACKAGES={pip-packages}
145 - shell: !include-raw-escape: ../shell/pip-install.sh
148 name: lf-provide-maven-settings-cleanup
152 set +e # DO NOT cause build failure if any of the rm calls fail.
154 rm "$GLOBAL_SETTINGS_FILE" "$SETTINGS_FILE"
156 # In some cases we use the lf-provide-maven-settings macro to produce
157 # a "$HOME/.netrc" file containing credentials. Remove that file here
161 # DO NOT fail build if any of the above lines fail.
165 name: lf-rtd-trigger-build
168 properties-content: RTD_PROJECT={rtd-project}
169 - shell: !include-raw-escape: ../shell/rtd-trigger-build.sh
175 properties-content: DOC_DIR={doc-dir}
176 - shell: !include-raw-escape:
177 - ../shell/tox-install.sh
178 - ../shell/rtd-verify.sh
185 name: lf-infra-maven-parameters
189 # Sets an env var for shell scripts to be able to call the dynamically
190 # installed maven without having to calculate the M2_HOME themselves.
191 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}'
192 description: 'Maven selector to be used by shell scripts'
195 default: '{mvn-opts}'
197 Maven Java opts. Example: -Xmx1024m -XX:MaxPermSize=256m
200 default: '{mvn-params}'
202 Maven parameters to pass to the mvn command.
205 # Sets an env var for shell scripts to be able to call the dynamically
206 # installed maven without having to calculate the path themselves.
207 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn'
208 description: 'Maven selector to be used by shell scripts'
210 name: STAGING_PROFILE_ID
211 default: '{staging-profile-id}'
213 Nexus staging profile ID.
217 name: lf-infra-openstack-parameters
221 default: '{os-cloud}'
223 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
224 variable name that is significant to openstack client as a
225 environment variable. Please refer to the documentation for
227 https://docs.openstack.org/developer/python-openstackclient/
231 name: lf-infra-parameters
232 # Standard parameters used in the LF CI environments. Gerrit variables are
233 # not used by GitHub projects, but defining them isn't harmful.
239 Parameter to identify a Gerrit project. This is typically the
240 project repo path as exists in Gerrit.
241 For example: ofextensions/circuitsw
246 Stream is often set to the same name as 'branch' but can
247 sometimes be used as a name representing a project's release code
253 Parameter to identify Gerrit project. This is typically the
254 project repo path as exists in Gerrit.
255 For example: ofextensions/circuitsw
257 Note that Gerrit will override this parameter automatically if a
258 job is triggered by Gerrit.
263 Parameter to identify a Gerrit branch.
265 Note that Gerrit will override this parameter automatically if a
266 job is triggered by Gerrit.
269 default: 'refs/heads/{branch}'
271 Parameter to identify a refspec when pulling from Gerrit.
273 Note that Gerrit will override this parameter automatically if a
274 job is triggered by Gerrit.
276 name: LFTOOLS_VERSION
277 default: '{lftools-version}'
279 Version of lftools to install. Can be a specific version like
280 '0.6.0' or a PEP-440 definition.
281 https://www.python.org/dev/peps/pep-0440/
282 For example '<1.0.0' or '>=1.0.0,<2.0.0'.
285 name: lf-infra-node-parameters
289 default: '{node-dir}'
290 description: Path to a Node project directory.
293 default: '{node-version}'
294 description: Version of NodeJS to install.
297 name: lf-infra-tox-parameters
303 Path to directory containing tox.ini file.
306 default: '{tox-envs}'
308 Tox environments to run build against.
309 Example: docs,py2,py3
316 name: lf-infra-properties
319 # Allow build data to be stored at a length configured by the
320 # downstream project.
321 days-to-keep: '{build-days-to-keep}'
322 # Do not allow artifacts to be stored in Jenkins.
323 artifact-num-to-keep: 0
330 name: lf-jacoco-report
333 exec-pattern: "**/**.exec"
334 class-pattern: "**/classes"
335 source-pattern: "**/src/main/java"
336 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
347 name: lf-infra-publish
348 # lf-infra macro to finish up a build.
350 # Handles the following:
351 # - Shipping logs to Nexus logs site repository
352 # - Cleanup workspace
358 script-only-if-succeeded: false
359 script-only-if-failed: false
360 mark-unstable-if-failed: false
363 # Do not clean up *.jenkins-trigger files for jobs that use a
364 # properties file as input for triggering another build.
365 - '**/*.jenkins-trigger'
373 name: lf-infra-gerrit-scm
376 credentials-id: '{jenkins-ssh-credential}'
380 - 'refs/heads/{branch}'
384 recursive: '{submodule-recursive}'
385 choosing-strategy: '{choosing-strategy}'
388 name: lf-infra-github-scm
391 credentials-id: '{jenkins-ssh-credential}'
399 recursive: '{submodule-recursive}'
400 choosing-strategy: '{choosing-strategy}'
407 name: lf-infra-github-pr-trigger
409 - github-pull-request:
410 trigger-phrase: '{trigger-phrase}'
411 only-trigger-phrase: '{only-trigger-phrase}'
412 status-context: '{status-context}'
413 permit-all: '{permit-all}'
414 github-hooks: '{github-hooks}'
415 auto-close-on-fail: false
418 white-list: '{obj:github_pr_whitelist}'
419 admin-list: '{obj:github_pr_admin_list}'
426 name: lf-infra-wrappers
431 timeout: '{build-timeout}'
432 timeout-var: 'BUILD_TIMEOUT'
435 - ssh-agent-credentials:
437 - '{jenkins-ssh-credential}'
440 - config-file-provider:
443 target: '$HOME/.npmrc'