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-jacoco-nojava-workaround
46 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
48 # call maven-target builder with a goal of --version to force Jenkins to
49 # install the needed maven version
51 name: lf-maven-install
54 maven-version: '{maven-version}'
57 # Push a global settings and user settings maven files
59 name: lf-provide-maven-settings
61 - config-file-provider:
63 - file-id: '{global-settings-file}'
64 variable: 'GLOBAL_SETTINGS_FILE'
65 - file-id: '{settings-file}'
66 variable: 'SETTINGS_FILE'
70 # Standard parameters used in the LF CI environments. Gerrit variables are not
71 # used by GitHub projects, but defining them isn't harmful
73 name: lf-infra-parameters
79 Parameter to identify a Gerrit project. This is typically the
80 project repo path as exists in Gerrit.
81 For example: ofextensions/circuitsw
83 (Deprecated) Please use GERRIT_PROJECT instead. A future version
84 of global-jjb will remove this variable.
89 Parameter to identify Gerrit project. This is typically the
90 project repo path as exists in Gerrit.
91 For example: ofextensions/circuitsw
93 Note that Gerrit will override this parameter automatically if a
94 job is triggered by Gerrit.
99 Parameter to identify a Gerrit branch.
101 Note that Gerrit will override this parameter automatically if a
102 job is triggered by Gerrit.
107 Parameter to identify a refspec when pulling from Gerrit.
109 Note that Gerrit will override this parameter automatically if a
110 job is triggered by Gerrit.
112 # Useful parameters when working with TOX
113 # https://tox.readthedocs.io/
115 name: lf-infra-tox-parameters
121 Path to directory containing tox.ini file.
124 default: '{tox-envs}'
126 Tox environments to run build against.
127 Example: docs,py2,py3
129 # Set an env var for shell scripts to be able to call the dynamically installed
130 # maven without having to calculate the path themselves
136 # yamllint disable-line rule:line-length
137 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
138 description: 'Maven selector to be used by shell scripts'
143 name: lf-infra-properties
146 # Allow build data to be stored at a length configured by the
147 # downstream project.
148 days-to-keep: '{build-days-to-keep}'
149 # Do not allow artifacts to be stored in Jenkins.
150 artifact-num-to-keep: 0
154 name: lf-infra-publish
155 # lf-infra macro to finish up a build.
157 # Handles the following:
158 # - Shipping logs to Nexus logs site repository
159 # - Cleanup workspace
164 script-only-if-succeeded: false
165 script-only-if-failed: false
166 mark-unstable-if-failed: false
169 # Do not clean up *.jenkins-trigger files for jobs that use a
170 # properties file as input for triggering another build.
171 - '**/*.jenkins-trigger'
176 name: lf-infra-gerrit-scm
179 credentials-id: '{jenkins-ssh-credential}'
183 - 'refs/heads/{branch}'
187 recursive: '{submodule-recursive}'
188 choosing-strategy: '{choosing-strategy}'
191 name: lf-infra-github-scm
194 credentials-id: '{jenkins-ssh-credential}'
200 recursive: '{submodule-recursive}'
201 choosing-strategy: '{choosing-strategy}'
205 name: lf-infra-wrappers
210 timeout: '{build-timeout}'
211 timeout-var: 'BUILD_TIMEOUT'
214 - ssh-agent-credentials:
216 - '{jenkins-ssh-credential}'