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 # Set an env var for shell scripts to be able to call the dynamically installed
113 # maven without having to calculate the path themselves
119 # yamllint disable-line rule:line-length
120 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
121 description: 'Maven selector to be used by shell scripts'
126 name: lf-infra-properties
129 # Allow build data to be stored at a length configured by the
130 # downstream project.
131 days-to-keep: '{build-days-to-keep}'
132 # Do not allow artifacts to be stored in Jenkins.
133 artifact-num-to-keep: 0
137 name: lf-infra-publish
138 # lf-infra macro to finish up a build.
140 # Handles the following:
141 # - Shipping logs to Nexus logs site repository
142 # - Cleanup workspace
147 script-only-if-succeeded: false
148 script-only-if-failed: false
149 mark-unstable-if-failed: false
152 # Do not clean up *.jenkins-trigger files for jobs that use a
153 # properties file as input for triggering another build.
154 - '**/*.jenkins-trigger'
159 name: lf-infra-gerrit-scm
162 credentials-id: '{jenkins-ssh-credential}'
166 - 'refs/heads/{branch}'
170 recursive: '{submodule-recursive}'
171 choosing-strategy: '{choosing-strategy}'
174 name: lf-infra-github-scm
177 credentials-id: '{jenkins-ssh-credential}'
183 recursive: '{submodule-recursive}'
184 choosing-strategy: '{choosing-strategy}'
188 name: lf-infra-wrappers
193 timeout: '{build-timeout}'
194 timeout-var: 'BUILD_TIMEOUT'
197 - ssh-agent-credentials:
199 - '{jenkins-ssh-credential}'