4 name: lf-infra-create-netrc
5 # Macro to create a ~/.netrc file from a Maven settings.xml
7 # {server-id} The id of a server as defined in settings.xml
10 properties-content: 'SERVER_ID={server-id}'
11 - shell: !include-raw-escape: ../shell/create-netrc.sh
14 name: lf-infra-gpg-verify-git-signature
15 # Verify gpg signature of the latest commit message in $WORKSPACE
17 # This command assumes that $WORKSPACE is a git repo.
19 # TODO: Verify signature after downloading users public key from a locally
20 # created repository instead of the public keymesh. This requires a process
21 # in place to get ODL developers public keys into a local repository without
22 # increasing the job thoughput.
24 - shell: !include-raw: ../shell/gpg-verify-git-signature.sh
27 name: lf-infra-ship-logs
29 - config-file-provider:
31 - file-id: 'jenkins-log-archives-settings'
32 variable: 'SETTINGS_FILE'
33 - lf-infra-create-netrc:
35 - shell: !include-raw:
36 - ../shell/lftools-install.sh
37 - ../shell/logs-deploy.sh
38 - shell: !include-raw:
39 - ../shell/logs-clear-credentials.sh
41 regexp: '^Build logs: .*'
44 name: lf-infra-sysstat
46 - shell: !include-raw:
50 name: lf-jacoco-nojava-workaround
52 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
54 # call maven-target builder with a goal of --version to force Jenkins to
55 # install the needed maven version
57 name: lf-maven-install
60 maven-version: '{maven-version}'
63 # Push a global settings and user settings maven files
65 name: lf-provide-maven-settings
67 - config-file-provider:
69 - file-id: '{global-settings-file}'
70 variable: 'GLOBAL_SETTINGS_FILE'
71 - file-id: '{settings-file}'
72 variable: 'SETTINGS_FILE'
76 # Standard parameters used in the LF CI environments. Gerrit variables are not
77 # used by GitHub projects, but defining them isn't harmful
79 name: lf-infra-parameters
85 Parameter to identify a Gerrit project. This is typically the
86 project repo path as exists in Gerrit.
87 For example: ofextensions/circuitsw
89 (Deprecated) Please use GERRIT_PROJECT instead. A future version
90 of global-jjb will remove this variable.
95 Parameter to identify Gerrit project. This is typically the
96 project repo path as exists in Gerrit.
97 For example: ofextensions/circuitsw
99 Note that Gerrit will override this parameter automatically if a
100 job is triggered by Gerrit.
105 Parameter to identify a Gerrit branch.
107 Note that Gerrit will override this parameter automatically if a
108 job is triggered by Gerrit.
113 Parameter to identify a refspec when pulling from Gerrit.
115 Note that Gerrit will override this parameter automatically if a
116 job is triggered by Gerrit.
118 # Useful parameters when working with TOX
119 # https://tox.readthedocs.io/
121 name: lf-infra-tox-parameters
127 Path to directory containing tox.ini file.
130 default: '{tox-envs}'
132 Tox environments to run build against.
133 Example: docs,py2,py3
135 # Set an env var for shell scripts to be able to call the dynamically installed
136 # maven without having to calculate the path themselves
142 # yamllint disable-line rule:line-length
143 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
144 description: 'Maven selector to be used by shell scripts'
149 name: lf-infra-properties
152 # Allow build data to be stored at a length configured by the
153 # downstream project.
154 days-to-keep: '{build-days-to-keep}'
155 # Do not allow artifacts to be stored in Jenkins.
156 artifact-num-to-keep: 0
160 name: lf-infra-publish
161 # lf-infra macro to finish up a build.
163 # Handles the following:
164 # - Shipping logs to Nexus logs site repository
165 # - Cleanup workspace
171 script-only-if-succeeded: false
172 script-only-if-failed: false
173 mark-unstable-if-failed: false
176 # Do not clean up *.jenkins-trigger files for jobs that use a
177 # properties file as input for triggering another build.
178 - '**/*.jenkins-trigger'
183 name: lf-infra-gerrit-scm
186 credentials-id: '{jenkins-ssh-credential}'
190 - 'refs/heads/{branch}'
194 recursive: '{submodule-recursive}'
195 choosing-strategy: '{choosing-strategy}'
198 name: lf-infra-github-scm
201 credentials-id: '{jenkins-ssh-credential}'
207 recursive: '{submodule-recursive}'
208 choosing-strategy: '{choosing-strategy}'
212 name: lf-infra-wrappers
217 timeout: '{build-timeout}'
218 timeout-var: 'BUILD_TIMEOUT'
221 - ssh-agent-credentials:
223 - '{jenkins-ssh-credential}'