11 Recommended jobs that should be deployed for CI using Gerrit.
15 - gerrit-jenkins-cfg-merge
16 - gerrit-jjb-deploy-job
20 {project-name}-github-ci-jobs
21 -----------------------------
23 Recommended jobs that should be deployed CI using GitHub.
27 - github-jenkins-cfg-merge
28 - github-jjb-deploy-job
32 {project-name}-info-yaml-jobs
33 -----------------------------
35 Jobs to verify INFO.yaml file changes.
39 - gerrit-info-yaml-verify
41 {project-name}-github-info-yaml-jobs
42 ------------------------------------
44 Jobs to verify INFO.yaml file changes using Github.
48 - github-info-yaml-verify
50 {project-name}-packer-jobs
51 --------------------------
53 Jobs related to Packer builds for CI using Gerrit.
58 - gerrit-packer-verify
60 {project-name}-github-packer-jobs
61 ---------------------------------
63 Jobs related to Packer builds for CI using GitHub.
68 - github-packer-verify
73 lf-infra-jjb-parameters
74 -----------------------
78 :jjb-version: Version of Jenkins Job Builder (JJB) to install and use in
84 Deploys Jenkins Cloud configuration read from the ``jenkins-clouds`` directory
85 in ci-management repositories.
89 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
90 config definitions for "production" and "sandbox" systems.
94 :jenkins-silos: Space-separated list of Jenkins silos to update
95 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
97 lf-jenkins-cfg-global-vars
98 --------------------------
100 Manages the Global Jenkins variables. This macro will clear all exist macros
101 in Jenkins and replaces them with the ones defined by the
102 ci-management/jenkins-config/global-vars-SILO.sh script.
106 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
107 config definitions for "production" and "sandbox" systems.
109 :Required parameters:
111 :jenkins-silos: Space-separated list of Jenkins silos to update
112 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
117 Provides jenkins_jobs.ini configuration for Jenkins.
119 lf-infra-jjbini-sandbox
120 -----------------------
122 Provides jenkins_jobs.ini configuration for Jenkins sandbox.
124 .. todo:: This needs to be consolidated into lf-infra-jjbini when JJB 2.0 is available
129 Common packer configuration.
134 Gerrit file-paths for packer jobs.
139 Parameters useful for packer related tasks.
143 :packer-version: Version of packer to install / use.
144 (shell: PACKER_VERSION)
146 lf-packer-verify-file-paths
147 ---------------------------
149 Gerrit file-paths for packer verify jobs.
157 Job submits a patch to lock or unlock a project's branch.
160 - {project-name}-gerrit-branch-lock-{stream}
164 .. _lf-global-jjb-jenkins-cfg-merge:
166 Jenkins Configuration Merge
167 ---------------------------
169 Jenkins job to manage Global Jenkins configuration.
173 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
174 config definitions for "production" and "sandbox" systems.
178 - {project-name}-jenkins-cfg-merge
179 - gerrit-jenkins-cfg-merge
180 - github-jenkins-cfg-merge
182 :Optional parameters:
184 :branch: Git branch to build against. (default: master)
185 :cron: How often to run the job on a cron schedule. (default: @daily)
186 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
187 :jenkins-silos: Space separated list of Jenkins silos to update
188 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
189 (default: production sandbox)
191 Typically this template is automatically pulled in by the
192 "{project-name}-ci-jobs" job-group and does not need to be explicitly called if
193 the job group is being used.
197 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
202 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-full.yaml
205 .. _jenkins-cfg-envvar:
207 Global Environment Variables
208 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210 Global Environment Variables are managed via the
211 ``jenkins-config/global-vars-SILO.sh`` file in ci-management. Replace SILO with
212 the name of the Jenkins silo the variable configuration is for.
214 The format for this file is ``KEY=value`` for example::
216 GERRIT_URL=https://git.opendaylight.org/gerrit
217 GIT_BASE=git://devvexx.opendaylight.org/mirror/$PROJECT
218 GIT_URL=git://devvexx.opendaylight.org/mirror
219 JENKINS_HOSTNAME=vex-yul-odl-jenkins-2
220 LOGS_SERVER=https://logs.opendaylight.org
221 NEXUS_URL=https://nexus.opendaylight.org
222 ODLNEXUSPROXY=https://nexus.opendaylight.org
224 SONAR_URL=https://sonar.opendaylight.org
229 This configuration requires the OpenStack Cloud plugin in Jenkins and is
230 currently the only cloud plugin supported.
232 OpenStack Cloud plugin version supported:
237 Cloud configuration are managed via a directory structure in ci-management as
240 - jenkins-config/clouds/openstack/
241 - jenkins-config/clouds/openstack/cattle/cloud.cfg
242 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
243 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
244 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
246 The directory name inside of the "openstack" directory is used as the name of
247 the cloud configuration. In this case "cattle" is being used as the cloud name.
249 The ``cloud.cfg`` file is a special file used to configure the main cloud
250 configuration in the format ``KEY=value``.
254 :CLOUD_URL: API endpoint URL for Keystone.
256 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
257 :CLOUD_ZONE: OpenStack region to use. (default: "")
258 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
259 (default: "os-cloud")
260 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
262 :SANDBOX_CAP: Total number of instances the clodu will allow to
263 spin up. This applies to "sandbox" systems and overrides the
264 INSTANCE_CAP setting. (default: null)
266 :Template Parameters:
270 In the case of template definitions of a parameter below is not passed
271 the one defined in default clouds will be inherited.
273 :IMAGE_NAME: The image name to use for this template.
275 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
276 :HARDWARE_ID: OpenStack flavor to use. (default: "")
277 :NETWORK_ID: OpenStack network to use. (default: "")
278 :USER_DATA_ID: User Data to pass into the instance.
279 (default: jenkins-init-script)
280 :INSTANCE_CAP: Total number of instances of this type that can be launched
281 at one time. When defined in clouds.cfg it defines the total for the
282 entire cloud. (default: null)
283 :SANDBOX_CAP: Total number of instances of this type that can be launched
284 at one time. When defined in clouds.cfg it defines the total for the
285 entire cloud. This applies to "sandbox" systems and overrides the
286 INSTANCE_CAP setting. (default: null)
287 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
288 :SECURITY_GROUPS: Security group to use. (default: "default")
289 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
290 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
291 provisioned and connected. (default: 600000)
292 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
294 :NUM_EXECUTORS: Number of executors to enable for the instance.
296 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
297 :FS_ROOT: File system root for the workspace. (default: "/w")
298 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
299 again before it's removed. If set to -1, the slave will be kept
300 forever. (default: 0)
302 For a live example see the OpenDaylight project jenkins-config directory.
303 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
308 :Cloud Configuration:
310 The directory ``groovy-inserts`` contains the groovy script output that is
311 used to push to Jenkins. In the event of a job failure this file can be
318 Deploy jobs to jenkins-sandbox system via code review comment
320 This job checks out the current code review patch and then runs a
321 `jenkins-jobs update` to push a patch defined by the comment.
325 - {project-name}-jjb-deploy-job
326 - gerrit-jjb-deploy-job
327 - github-jjb-deploy-job
329 :Comment Trigger: jjb-deploy JOB_NAME
333 JOB_NAME can include the * wildcard character to push multiple jobs
334 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
335 all builder-jjb-* jobs to the sandbox system.
337 :Required parameters:
339 :build-node: The node to run build on.
340 :jenkins-ssh-credential: Credential to use for SSH. (Generally
341 should be configured in defaults.yaml)
343 :Optional parameters:
345 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
346 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
352 Runs `jenkins-jobs update` to update production job configuration
355 - {project-name}-jjb-merge
359 :Required parameters:
361 :build-node: The node to run build on.
362 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
363 be configured in defaults.yaml)
364 :mvn-settings: The name of settings file containing credentials for
367 :Optional parameters:
369 :branch: Git branch to fetch for the build. (default: master)
370 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
371 :build-timeout: Timeout in minutes before aborting build. (default: 10)
372 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
373 :stream: Keyword that can be used to represent a release code-name.
374 Often the same as the branch. (default: master)
375 :submodule-recursive: Whether to checkout submodules recursively.
378 :gerrit_merge_triggers: Override Gerrit Triggers.
379 :gerrit_trigger_file_paths: Override file paths which can be used to
380 filter which file modifications will trigger a build.
381 (default defined by lf_jjb_common)
387 Runs `jenkins-jobs test` to validate JJB syntax
390 - {project-name}-jjb-verify
394 :Required parameters:
396 :build-node: The node to run build on.
397 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
398 be configured in defaults.yaml)
399 :mvn-settings: The name of settings file containing credentials for
402 :Optional parameters:
404 :branch: Git branch to fetch for the build. (default: master)
405 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
406 :build-timeout: Timeout in minutes before aborting build. (default: 10)
407 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
408 :stream: Keyword that can be used to represent a release code-name.
409 Often the same as the branch. (default: master)
410 :submodule-recursive: Whether to checkout submodules recursively.
413 :gerrit_verify_triggers: Override Gerrit Triggers.
414 :gerrit_trigger_file_paths: Override file paths which can be used to
415 filter which file modifications will trigger a build.
416 (default defined by lf_jjb_common)
418 .. _info-yaml-verify:
423 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
424 other file changes. Verifies INFO.yaml files follow the schema defined in
425 `global-jjb/info-schema`.
428 - {project-name}-info-yaml-verify
429 - gerrit-info-yaml-verify
430 - github-info-yaml-verify
432 :Required parameters:
434 :build-node: The node to run build on.
435 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
436 be configured in defaults.yaml)
438 :Optional parameters:
440 :branch: Git branch to fetch for the build. (default: master)
441 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
442 :build-timeout: Timeout in minutes before aborting build. (default: 10)
443 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
444 :stream: Keyword that can be used to represent a release code-name.
445 Often the same as the branch. (default: master)
446 :submodule-recursive: Whether to checkout submodules recursively.
448 :gerrit_verify_triggers: Override Gerrit Triggers.
455 Job to scan projects for files missing license headers.
458 - {project-name}-license-check
459 - gerrit-license-check
460 - github-license-check
462 :Optional parameters:
464 :build-timeout: Timeout in minutes before aborting build. (default: 15)
465 :file-patterns: Space-separated list of file patterns to scan.
466 (default: \*.go \*.groovy \*.java \*.py \*.sh)
467 :spdx-disable: Disable the SPDX-Identifier checker. (default: false)
468 :lhc-version: Version of LHC to use. (default: 0.2.0)
469 :license-exclude-paths: Comma-separated list of paths to exclude from the
470 license checker. The paths used here will be matched using a contains
471 rule so it is best to be as precise with the path as possible.
472 For example a path of '/src/generated/' will be searched as
473 '**/src/generated/**'.
474 Example: org/opendaylight/yang/gen,protobuff/messages
476 :licenses-allowed: Comma-separated list of allowed licenses.
477 (default: Apache-2.0,EPL-1.0,MIT)
479 .. _gjjb-packer-merge:
484 Packer Merge job runs `packer build` to build system images in the cloud.
487 - {project-name}-packer-merge-{platforms}-{templates}
488 - gerrit-packer-merge
489 - github-packer-merge
491 :Required parameters:
493 :build-node: The node to run build on.
494 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
495 be configured in defaults.yaml)
496 :mvn-settings: The name of settings file containing credentials for
498 :platforms: Platform or distribution to build. Typically json file
499 found in the packer/vars directory. (Example: centos)
500 :template: System template to build. Typically shell script found in
501 the packer/provision directory. (Example: java-builder)
503 :Optional parameters:
505 :cron: Time when the packer image should be rebuilt (default: @monthly)
506 :branch: Git branch to fetch for the build. (default: master)
507 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
508 :build-timeout: Timeout in minutes before aborting build. (default: 90)
509 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
510 :packer-cloud-settings: Name of settings file containing credentials
511 for the cloud that packer will build on. (default: packer-cloud-env)
512 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
513 :stream: Keyword that can be used to represent a release code-name.
514 Often the same as the branch. (default: master)
515 :submodule-recursive: Whether to checkout submodules recursively.
518 :gerrit_verify_triggers: Override Gerrit Triggers.
521 .. _gjjb-packer-verify:
526 Packer Verify job runs `packer validate` to verify packer configuration.
529 - {project-name}-packer-verify
530 - gerrit-packer-verify
531 - github-packer-verify
533 :Required parameters:
535 :build-node: The node to run build on.
536 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
537 be configured in defaults.yaml)
538 :mvn-settings: The name of settings file containing credentials for
541 :Optional parameters:
543 :branch: Git branch to fetch for the build. (default: master)
544 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
545 :build-timeout: Timeout in minutes before aborting build. (default: 10)
546 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
547 :packer-cloud-settings: Name of settings file containing credentials
548 for the cloud that packer will build on. (default: packer-cloud-env)
549 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
550 :stream: Keyword that can be used to represent a release code-name.
551 Often the same as the branch. (default: master)
552 :submodule-recursive: Whether to checkout submodules recursively.
555 :gerrit_verify_triggers: Override Gerrit Triggers.
556 :gerrit_trigger_file_paths: Override file paths which can be used to
557 filter which file modifications will trigger a build.