11 Recommended jobs that should be deployed for CI using Gerrit.
15 - gerrit-jenkins-cfg-merge
16 - gerrit-jenkins-sandbox-cleanup
17 - gerrit-jjb-deploy-job
21 {project-name}-github-ci-jobs
22 -----------------------------
24 Recommended jobs that should be deployed CI using GitHub.
28 - github-jenkins-cfg-merge
29 - github-jenkins-sandbox-cleanup
30 - github-jjb-deploy-job
34 {project-name}-info-yaml-jobs
35 -----------------------------
37 Jobs to verify INFO.yaml file changes.
41 - gerrit-info-yaml-verify
43 {project-name}-github-info-yaml-jobs
44 ------------------------------------
46 Jobs to verify INFO.yaml file changes using Github.
50 - github-info-yaml-verify
52 {project-name}-packer-jobs
53 --------------------------
55 Jobs related to Packer builds for CI using Gerrit.
60 - gerrit-packer-verify
62 {project-name}-github-packer-jobs
63 ---------------------------------
65 Jobs related to Packer builds for CI using GitHub.
70 - github-packer-verify
75 lf-infra-jjb-parameters
76 -----------------------
80 :jjb-version: Version of Jenkins Job Builder (JJB) to install and use in
86 Deploys Jenkins Cloud configuration read from the ``jenkins-clouds`` directory
87 in ci-management repositories.
91 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
92 config definitions for "production" and "sandbox" systems.
96 :jenkins-silos: Space-separated list of Jenkins silos to update
97 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
99 lf-jenkins-cfg-global-vars
100 --------------------------
102 Manages the Global Jenkins variables. This macro will clear all exist macros
103 in Jenkins and replaces them with the ones defined by the
104 ci-management/jenkins-config/global-vars-SILO.sh script.
108 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
109 config definitions for "production" and "sandbox" systems.
111 :Required parameters:
113 :jenkins-silos: Space-separated list of Jenkins silos to update
114 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
119 Provides jenkins_jobs.ini configuration for Jenkins.
121 lf-infra-jjbini-sandbox
122 -----------------------
124 Provides jenkins_jobs.ini configuration for Jenkins sandbox.
126 .. todo:: This needs to be consolidated into lf-infra-jjbini when JJB 2.0 is available
131 Common packer configuration.
136 Gerrit file-paths for packer jobs.
141 Parameters useful for packer related tasks.
145 :packer-version: Version of packer to install / use.
146 (shell: PACKER_VERSION)
148 lf-packer-verify-file-paths
149 ---------------------------
151 Gerrit file-paths for packer verify jobs.
159 Job submits a patch to lock or unlock a project's branch.
162 - {project-name}-gerrit-branch-lock-{stream}
166 .. _lf-global-jjb-jenkins-cfg-merge:
168 Jenkins Configuration Merge
169 ---------------------------
171 Jenkins job to manage Global Jenkins configuration.
175 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
176 config definitions for "production" and "sandbox" systems.
180 - {project-name}-jenkins-cfg-merge
181 - gerrit-jenkins-cfg-merge
182 - github-jenkins-cfg-merge
184 :Optional parameters:
186 :branch: Git branch to build against. (default: master)
187 :cron: How often to run the job on a cron schedule. (default: @daily)
188 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
189 :jenkins-silos: Space separated list of Jenkins silos to update
190 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
191 (default: production sandbox)
193 Typically this template is automatically pulled in by the
194 "{project-name}-ci-jobs" job-group and does not need to be explicitly called if
195 the job group is being used.
199 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
204 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-full.yaml
207 .. _jenkins-cfg-envvar:
209 Global Environment Variables
210 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
212 Global Environment Variables are managed via the
213 ``jenkins-config/global-vars-SILO.sh`` file in ci-management. Replace SILO with
214 the name of the Jenkins silo the variable configuration is for.
216 The format for this file is ``KEY=value`` for example::
218 GERRIT_URL=https://git.opendaylight.org/gerrit
219 GIT_BASE=git://devvexx.opendaylight.org/mirror/$PROJECT
220 GIT_URL=git://devvexx.opendaylight.org/mirror
221 JENKINS_HOSTNAME=vex-yul-odl-jenkins-2
222 LOGS_SERVER=https://logs.opendaylight.org
223 NEXUS_URL=https://nexus.opendaylight.org
224 ODLNEXUSPROXY=https://nexus.opendaylight.org
226 SONAR_URL=https://sonar.opendaylight.org
231 This configuration requires the OpenStack Cloud plugin in Jenkins and is
232 currently the only cloud plugin supported.
234 OpenStack Cloud plugin version supported:
239 Cloud configuration are managed via a directory structure in ci-management as
242 - jenkins-config/clouds/openstack/
243 - jenkins-config/clouds/openstack/cattle/cloud.cfg
244 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
245 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
246 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
248 The directory name inside of the "openstack" directory is used as the name of
249 the cloud configuration. In this case "cattle" is being used as the cloud name.
251 The ``cloud.cfg`` file is a special file used to configure the main cloud
252 configuration in the format ``KEY=value``.
256 :CLOUD_URL: API endpoint URL for Keystone.
258 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
259 :CLOUD_ZONE: OpenStack region to use. (default: "")
260 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
261 (default: "os-cloud")
262 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
264 :SANDBOX_CAP: Total number of instances the clodu will allow to
265 spin up. This applies to "sandbox" systems and overrides the
266 INSTANCE_CAP setting. (default: null)
268 :Template Parameters:
272 In the case of template definitions of a parameter below is not passed
273 the one defined in default clouds will be inherited.
275 :IMAGE_NAME: The image name to use for this template.
277 :HARDWARE_ID: OpenStack flavor to use. (required)
279 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
280 :NETWORK_ID: OpenStack network to use. (default: "")
281 :USER_DATA_ID: User Data to pass into the instance.
282 (default: jenkins-init-script)
283 :INSTANCE_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. (default: null)
286 :SANDBOX_CAP: Total number of instances of this type that can be launched
287 at one time. When defined in clouds.cfg it defines the total for the
288 entire cloud. This applies to "sandbox" systems and overrides the
289 INSTANCE_CAP setting. (default: null)
290 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
291 :SECURITY_GROUPS: Security group to use. (default: "default")
292 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
293 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
294 provisioned and connected. (default: 600000)
295 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
297 :NUM_EXECUTORS: Number of executors to enable for the instance.
299 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
300 :FS_ROOT: File system root for the workspace. (default: "/w")
301 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
302 again before it's removed. If set to -1, the slave will be kept
303 forever. (default: 0)
304 :CONNECTION_TYPE: The connection type for Jenkins to connect to the build
305 minion. Valid options: JNLP, SSH. (default: "SSH")
307 For a live example see the OpenDaylight project jenkins-config directory.
308 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
313 :Cloud Configuration:
315 The directory ``groovy-inserts`` contains the groovy script output that is
316 used to push to Jenkins. In the event of a job failure this file can be
320 Jenkins Sandbox Cleanup
321 -----------------------
323 Cleanup Jenkins Sandbox of jobs and views periodically.
327 - {project-name}-jenkins-sandbox-cleanup
328 - gerrit-jenkins-sandbox-cleanup
329 - github-jenkins-sandbox-cleanup
331 :Comment Trigger: NONE
333 :Required parameters:
335 :build-node: The node to run build on.
336 :jenkins-ssh-credential: Credential to use for SSH. (Generally
337 should be configured in defaults.yaml)
339 :Optional parameters:
341 :cron: Schedule to run job. (default: '0 8 * * 6')
347 Deploy jobs to jenkins-sandbox system via code review comment
349 This job checks out the current code review patch and then runs a
350 `jenkins-jobs update` to push a patch defined by the comment.
354 - {project-name}-jjb-deploy-job
355 - gerrit-jjb-deploy-job
356 - github-jjb-deploy-job
358 :Comment Trigger: jjb-deploy JOB_NAME
362 JOB_NAME can include the * wildcard character to push multiple jobs
363 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
364 all builder-jjb-* jobs to the sandbox system.
366 :Required parameters:
368 :build-node: The node to run build on.
369 :jenkins-ssh-credential: Credential to use for SSH. (Generally
370 should be configured in defaults.yaml)
372 :Optional parameters:
374 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
375 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
381 Runs `jenkins-jobs update` to update production job configuration
384 - {project-name}-jjb-merge
388 :Comment Trigger: remerge
390 :Required parameters:
392 :build-node: The node to run build on.
393 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
394 be configured in defaults.yaml)
396 :Optional parameters:
398 :branch: Git branch to fetch for the build. (default: master)
399 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
400 :build-timeout: Timeout in minutes before aborting build. (default: 10)
401 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
402 :jjb-version: JJB version to install. (default: see job-template)
403 :stream: Keyword that can be used to represent a release code-name.
404 Often the same as the branch. (default: master)
405 :submodule-recursive: Whether to checkout submodules recursively.
408 :gerrit_merge_triggers: Override Gerrit Triggers.
409 :gerrit_trigger_file_paths: Override file paths which can be used to
410 filter which file modifications will trigger a build.
411 (default defined by lf_jjb_common)
417 Runs `jenkins-jobs test` to validate JJB syntax
420 - {project-name}-jjb-verify
424 :Comment Trigger: recheck|reverify
426 :Required parameters:
428 :build-node: The node to run build on.
429 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
430 be configured in defaults.yaml)
432 :Optional parameters:
434 :branch: Git branch to fetch for the build. (default: master)
435 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
436 :build-timeout: Timeout in minutes before aborting build. (default: 10)
437 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
438 :jjb-version: JJB version to install. (default: see job-template)
439 :stream: Keyword that can be used to represent a release code-name.
440 Often the same as the branch. (default: master)
441 :submodule-recursive: Whether to checkout submodules recursively.
444 :gerrit_verify_triggers: Override Gerrit Triggers.
445 :gerrit_trigger_file_paths: Override file paths which can be used to
446 filter which file modifications will trigger a build.
447 (default defined by lf_jjb_common)
449 .. _jjb-verify-upstream-gjjb:
451 JJB Verify Upstream Global JJB
452 ------------------------------
454 Runs ``jenkins-jobs test`` to validate JJB syntax for upstream global-jjb
455 patches. This job is useful to notify upstream that they may be breaking
459 - {project-name}-jjb-verify-upstream-gjjb
460 - gerrit-jjb-verify-upstream-gjjb
462 :Comment Trigger: recheck|reverify
464 :Required parameters:
466 :build-node: The node to run build on.
467 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
468 be configured in defaults.yaml)
470 :Optional parameters:
472 :branch: Git branch to fetch for the build. (default: master)
473 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
474 :build-timeout: Timeout in minutes before aborting build. (default: 10)
475 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
476 :jjb-version: JJB version to install. (default: see job-template)
477 :stream: Keyword that can be used to represent a release code-name.
478 Often the same as the branch. (default: master)
480 .. _info-yaml-verify:
485 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
486 other file changes. Verifies INFO.yaml files follow the schema defined in
487 `global-jjb/info-schema`.
490 - {project-name}-info-yaml-verify
491 - gerrit-info-yaml-verify
492 - github-info-yaml-verify
494 :Required parameters:
496 :build-node: The node to run build on.
497 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
498 be configured in defaults.yaml)
500 :Optional parameters:
502 :branch: Git branch to fetch for the build. (default: master)
503 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
504 :build-timeout: Timeout in minutes before aborting build. (default: 10)
505 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
506 :stream: Keyword that can be used to represent a release code-name.
507 Often the same as the branch. (default: master)
508 :submodule-recursive: Whether to checkout submodules recursively.
510 :gerrit_verify_triggers: Override Gerrit Triggers.
517 Job to scan projects for files missing license headers.
520 - {project-name}-license-check
521 - gerrit-license-check
522 - github-license-check
524 :Optional parameters:
526 :build-timeout: Timeout in minutes before aborting build. (default: 15)
527 :file-patterns: Space-separated list of file patterns to scan.
528 (default: \*.go \*.groovy \*.java \*.py \*.sh)
529 :spdx-disable: Disable the SPDX-Identifier checker. (default: false)
530 :lhc-version: Version of LHC to use. (default: 0.2.0)
531 :license-exclude-paths: Comma-separated list of paths to exclude from the
532 license checker. The paths used here will be matched using a contains
533 rule so it is best to be as precise with the path as possible.
534 For example a path of '/src/generated/' will be searched as
535 '**/src/generated/**'.
536 Example: org/opendaylight/yang/gen,protobuff/messages
538 :licenses-allowed: Comma-separated list of allowed licenses.
539 (default: Apache-2.0,EPL-1.0,MIT)
540 :project-pattern: The ANT based pattern for Gerrit Trigger to choose which
541 projects to trigger job against. (default: '**')
543 .. _gjjb-openstack-cron:
548 Cron job that runs regularly to perform periodic tasks against OpenStack.
550 This job requires a Config File Provider file named ``clouds-yaml`` available
551 containing the credentials for the cloud.
554 - {project-name}-openstack-cron
555 - gerrit-openstack-cron
556 - github-openstack-cron
558 :Required parameters:
560 :build-node: The node to run build on.
561 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
562 be configured in defaults.yaml)
564 :Optional parameters:
566 :branch: Git branch to fetch for the build. (default: master)
567 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
568 :build-timeout: Timeout in minutes before aborting build. (default: 90)
569 :cron: Time when the packer image should be rebuilt (default: @daily)
570 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
571 :openstack-cloud: OS_CLOUD setting to pass to openstack client.
573 :stream: Keyword that can be used to represent a release code-name.
574 Often the same as the branch. (default: master)
575 :submodule-recursive: Whether to checkout submodules recursively.
578 .. _gjjb-packer-merge:
583 Packer Merge job runs `packer build` to build system images in the cloud.
586 - {project-name}-packer-merge-{platforms}-{templates}
587 - gerrit-packer-merge
588 - github-packer-merge
590 :Comment Trigger: remerge
592 :Required parameters:
594 :build-node: The node to run build on.
595 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
596 be configured in defaults.yaml)
597 :mvn-settings: The name of settings file containing credentials for
599 :platforms: Platform or distribution to build. Typically json file
600 found in the packer/vars directory. (Example: centos)
601 :template: System template to build. Typically shell script found in
602 the packer/provision directory. (Example: java-builder)
604 :Optional parameters:
606 :cron: Time when the packer image should be rebuilt (default: @monthly)
607 :branch: Git branch to fetch for the build. (default: master)
608 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
609 :build-timeout: Timeout in minutes before aborting build. (default: 90)
610 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
611 :packer-cloud-settings: Name of settings file containing credentials
612 for the cloud that packer will build on. (default: packer-cloud-env)
613 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
614 :stream: Keyword that can be used to represent a release code-name.
615 Often the same as the branch. (default: master)
616 :submodule-recursive: Whether to checkout submodules recursively.
619 :gerrit_verify_triggers: Override Gerrit Triggers.
622 .. _gjjb-packer-verify:
627 Packer Verify job runs `packer validate` to verify packer configuration.
630 - {project-name}-packer-verify
631 - gerrit-packer-verify
632 - github-packer-verify
634 :Comment Trigger: recheck|reverify
636 :Required parameters:
638 :build-node: The node to run build on.
639 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
640 be configured in defaults.yaml)
641 :mvn-settings: The name of settings file containing credentials for
644 :Optional parameters:
646 :branch: Git branch to fetch for the build. (default: master)
647 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
648 :build-timeout: Timeout in minutes before aborting build. (default: 10)
649 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
650 :packer-cloud-settings: Name of settings file containing credentials
651 for the cloud that packer will build on. (default: packer-cloud-env)
652 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
653 :stream: Keyword that can be used to represent a release code-name.
654 Often the same as the branch. (default: master)
655 :submodule-recursive: Whether to checkout submodules recursively.
658 :gerrit_verify_triggers: Override Gerrit Triggers.
659 :gerrit_trigger_file_paths: Override file paths which can be used to
660 filter which file modifications will trigger a build.