8 lf-fetch-dependent-patches
9 --------------------------
11 Fetch all patches provided via comment trigger
13 This macro will fetch all patches provided via comment trigger and will
14 create a list of projects from those patches via environment variable
15 called DEPENDENCY_BUILD_ORDER which can be used if necessary to build
16 projects in the specified order. The order is determined by first patch
17 instance for a project in the patch list.
26 :file-patterns: Space-separated list of file patterns to scan.
27 For example: \*.go \*.groovy \*.java \*.py \*.sh
28 :spdx-disable: Disable the SPDX-Identifier checker.
29 :lhc-version: Version of LHC to use.
30 :license-exclude-paths: Comma-separated list of paths to exclude from the
31 license checker. The paths used here will be matched using a contains
32 rule so it is best to be as precise with the path as possible.
33 For example a path of '/src/generated/' will be searched as
34 '**/src/generated/**'.
35 Example: org/opendaylight/yang/gen,protobuff/messages
36 :licenses-allowed: Comma-separated list of allowed licenses.
37 For example: Apache-2.0,EPL-1.0,MIT
42 Create a ~/.netrc file from a Maven settings.xml
46 :server-id: The id of a server as defined in settings.xml.
50 :ALT_NEXUS_SERVER: URL of custom nexus server.
51 If set this will take precedence.
52 Use this to point at nexus3.$PROJECTDOMAIN
55 lf-infra-deploy-maven-file
56 --------------------------
58 Deploy files to a repository.
62 :global-settings-file: Global settings file to use.
63 :group-id: Group ID of the repository.
64 :maven-repo-url: URL of a Maven repository to upload to.
65 :mvn-version: Version of Maven to use.
66 :repo-id: Repository ID
67 :settings-file: Maven settings file to use.
68 :upload-files-dir: Path to directory containing one or more files
73 Login into a custom hosted docker registry and / or docker.io
75 The Jenkins system should have the following global variables defined
77 :Environment variables:
79 :DOCKER_REGISTRY: The DNS address of the registry (IP or FQDN)
80 ex: nexus3.example.com (GLOBAL variable)
82 :REGISTRY_PORTS: Required if DOCKER_REGISTRY is set. Space separated list
83 of the registry ports to login to. ex: 10001 10002 10003 10004
86 :DOCKERHUB_EMAIL: If this variable is set then an attempt to login to
87 DockerHub (docker.io) will be also made. It should be set to the email
88 address for the credentials that will get looked up. Only _one_
89 credential will ever be found in the maven settings file for DockerHub.
92 lf-infra-gpg-verify-git-signature
93 ---------------------------------
95 Verify gpg signature of the latest commit message in $WORKSPACE.
96 This command assumes that $WORKSPACE is a git repo.
101 Macro that runs before all builders to prepare the system for job use.
103 lf-infra-package-listing
104 ------------------------
106 Lists distro level packages.
108 lf-infra-packer-build
109 ---------------------
111 Run `packer build` to build system images.
113 :Required parameters:
115 :openstack: Packer template uses an OpenStack builder (true|false).
116 :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
117 :packer-version: Version of packer to use.
118 :platform: Build platform as found in the vars directory.
119 :template: Packer template to build as found in the templates directory.
121 lf-infra-packer-validate
122 ------------------------
124 Run `packer validate` to verify packer configuration.
126 :Required parameters:
128 :openstack: Packer template uses an OpenStack builder (true|false).
129 :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
130 :packer-cloud-settings: Cloud configuration file. Loaded on the build
131 server as CLOUDENV environment variable.
132 :packer-version: Version of packer to use.
134 lf-infra-push-gerrit-patch
135 --------------------------
137 Push a change through a Jenkins job to a Gerrit repository in an automated
138 way using git-review.
140 :Required parameters:
142 :gerrit-commit-message: Commit message to assign.
143 :gerrit-host: Gerrit hostname.
144 :gerrit-topic: Gerrit topic.
145 :gerrit-user: Gerrit user-id used for submitting the change.
146 :reviewers-email: Reviewers email. Space-separated list of
147 email addresses to CC on the patch.
148 :project: Gerrit project name.
150 .. _lf-infra-ship-logs:
155 Gather and deploy logs to a log server.
160 Retrieves system stats.
162 lf-jacoco-nojava-workaround
163 ---------------------------
165 Workaround for Jenkins not able to find Java in JaCoCo runs.
170 Call maven-target builder with a goal of --version to force Jenkins to
171 install the need provided version of Maven. This is needed for any shell scripts
172 that want to use Maven.
174 :Required parameters:
176 :mvn-version: Version of Maven to install.
181 Call pip install to install packages into a virtualenv located in
184 .. note:: The first package listed in PIP_PACKAGES is used as the VENV name.
186 .. _lf-provide-maven-settings:
188 lf-provide-maven-settings
189 -------------------------
191 Push a global settings and user settings maven files to the build node.
193 lf-provide-maven-settings-cleanup
194 ---------------------------------
196 Cleanup maven settings.xml configuration. This should be called at the end of
197 any macros that calles the
198 :ref:`lf-provide-maven-settings <lf-provide-maven-settings>` macro.
203 Script to trigger a build on http://readthedocs.org
208 ReadTheDocs verify script.
213 Use Sigul to sign a directory via {sign-dir}.
215 Requires ``SIGUL_BRIDGE_IP`` configured as a global envvar.
217 :Required Parameters:
218 :sign-artifacts: Whether or not to sign artifacts with Sigul.
219 :sign-dir: Directory to sign.
221 lf-infra-provide-docker-cleanup
222 -------------------------------
224 Forcibly removes all of the docker images.
232 Provides the policy evaluation stage to run against Nexus IQ Server.
233 Valid values include: 'build', 'stage-release', 'operate'.
238 Provides parameters needed by CMake. Should be used by any jobs that need to
239 call the ``cmake && make && make install`` pattern.
241 lf-infra-maven-parameters
242 -------------------------
244 Provides parameters needed by Maven. Should be used by any jobs that need to
247 lf-infra-openstack-parameters
248 -----------------------------
250 Provides parameters needed by OpenStack client CLI. Use in jobs that need to
251 call the openstack cli.
253 :Required Parameters:
255 :os-cloud: Configures ``OS_CLOUD`` envvar as used by openstack cli.
260 Standard parameters used in the LF CI environments. Gerrit variables are
261 not used by GitHub projects, but defining them is not harmful. Should be used
262 in every job template.
264 lf-infra-node-parameters
265 ------------------------
267 Provides parameters needed by NodeJS and NPM. Should be used by any jobs that
268 need to run NodeJS or NPM.
270 lf-infra-tox-parameters
271 -----------------------
273 Provides parameters needed by python-tox. Should be used by any jobs that need
274 to run `tox <https://tox.readthedocs.io>`.
282 Configures the build-discarder plugin for Jenkins with the recommended lf-infra
283 settings. Should be used in all job-templates.
291 Provides basic configuration for the JaCoCo plugin.
296 Provides basic lf-infra recommended publisher configurations which should be
297 used in all job templates. This primary objective of this trigger is to
298 gather build logs and copy them to a log server.
300 lf-infra-publish-windows
301 ------------------------
303 Windows publisher for use at the end of Windows job templates. Takes care of
304 cleaning out the workspace at the end of a job.
313 Delete an openstack heat stack. Use at the end of a job that creates a stack.
315 This macro requires a parameter defined in the job named STACK_NAME
316 containing the name of the stack to delete.
324 Basic SCM configuration for Gerrit based projects.
329 Basic SCM configuration for GitHub based projects.
331 On the `branch` variable you can assign `$sha1` or `$ghprbActualCommit`
332 as the value. This will require that the job be triggered via
333 the GHPRB plugin and not manually.
338 lf-infra-wrappers-common
339 ------------------------
341 Provides lf-infra recommended wrappers which should be used in every
342 job-template. It's meant to be used by more specific wrappers below.
347 Provides lf-infra recommended wrappers which should be used in every
348 job-template that's run on Linux systems.
350 This wrapper requires that a managed file called `npmrc` exists in the Jenkins.
351 The main use case here is to point to a npm proxy, on Nexus for example.
352 The type of the file should be "Custom file". You can set various npmrc
353 settings in it. Documentation on npm configuration can be found at
354 https://docs.npmjs.com/files/npmrc. If you are not using npm then it is fine
355 for the file to be empty.
361 registry=https://nexus3.onap.org/repository/npm.public/
363 lf-infra-wrappers-windows
364 -------------------------
366 Provides lf-infra recommended wrappers which should be used in every
367 job-template that's run on Windows systems.