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)
301 :CONNECTION_TYPE: The connection type for Jenkins to connect to the build
302 minion. Valid options: JNLP, SSH. (default: "SSH")
304 For a live example see the OpenDaylight project jenkins-config directory.
305 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
310 :Cloud Configuration:
312 The directory ``groovy-inserts`` contains the groovy script output that is
313 used to push to Jenkins. In the event of a job failure this file can be
320 Deploy jobs to jenkins-sandbox system via code review comment
322 This job checks out the current code review patch and then runs a
323 `jenkins-jobs update` to push a patch defined by the comment.
327 - {project-name}-jjb-deploy-job
328 - gerrit-jjb-deploy-job
329 - github-jjb-deploy-job
331 :Comment Trigger: jjb-deploy JOB_NAME
335 JOB_NAME can include the * wildcard character to push multiple jobs
336 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
337 all builder-jjb-* jobs to the sandbox system.
339 :Required parameters:
341 :build-node: The node to run build on.
342 :jenkins-ssh-credential: Credential to use for SSH. (Generally
343 should be configured in defaults.yaml)
345 :Optional parameters:
347 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
348 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
354 Runs `jenkins-jobs update` to update production job configuration
357 - {project-name}-jjb-merge
361 :Required parameters:
363 :build-node: The node to run build on.
364 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
365 be configured in defaults.yaml)
366 :mvn-settings: The name of settings file containing credentials for
369 :Optional parameters:
371 :branch: Git branch to fetch for the build. (default: master)
372 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
373 :build-timeout: Timeout in minutes before aborting build. (default: 10)
374 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
375 :stream: Keyword that can be used to represent a release code-name.
376 Often the same as the branch. (default: master)
377 :submodule-recursive: Whether to checkout submodules recursively.
380 :gerrit_merge_triggers: Override Gerrit Triggers.
381 :gerrit_trigger_file_paths: Override file paths which can be used to
382 filter which file modifications will trigger a build.
383 (default defined by lf_jjb_common)
389 Runs `jenkins-jobs test` to validate JJB syntax
392 - {project-name}-jjb-verify
396 :Required parameters:
398 :build-node: The node to run build on.
399 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
400 be configured in defaults.yaml)
401 :mvn-settings: The name of settings file containing credentials for
404 :Optional parameters:
406 :branch: Git branch to fetch for the build. (default: master)
407 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
408 :build-timeout: Timeout in minutes before aborting build. (default: 10)
409 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
410 :stream: Keyword that can be used to represent a release code-name.
411 Often the same as the branch. (default: master)
412 :submodule-recursive: Whether to checkout submodules recursively.
415 :gerrit_verify_triggers: Override Gerrit Triggers.
416 :gerrit_trigger_file_paths: Override file paths which can be used to
417 filter which file modifications will trigger a build.
418 (default defined by lf_jjb_common)
420 .. _info-yaml-verify:
425 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
426 other file changes. Verifies INFO.yaml files follow the schema defined in
427 `global-jjb/info-schema`.
430 - {project-name}-info-yaml-verify
431 - gerrit-info-yaml-verify
432 - github-info-yaml-verify
434 :Required parameters:
436 :build-node: The node to run build on.
437 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
438 be configured in defaults.yaml)
440 :Optional parameters:
442 :branch: Git branch to fetch for the build. (default: master)
443 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
444 :build-timeout: Timeout in minutes before aborting build. (default: 10)
445 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
446 :stream: Keyword that can be used to represent a release code-name.
447 Often the same as the branch. (default: master)
448 :submodule-recursive: Whether to checkout submodules recursively.
450 :gerrit_verify_triggers: Override Gerrit Triggers.
457 Job to scan projects for files missing license headers.
460 - {project-name}-license-check
461 - gerrit-license-check
462 - github-license-check
464 :Optional parameters:
466 :build-timeout: Timeout in minutes before aborting build. (default: 15)
467 :file-patterns: Space-separated list of file patterns to scan.
468 (default: \*.go \*.groovy \*.java \*.py \*.sh)
469 :spdx-disable: Disable the SPDX-Identifier checker. (default: false)
470 :lhc-version: Version of LHC to use. (default: 0.2.0)
471 :license-exclude-paths: Comma-separated list of paths to exclude from the
472 license checker. The paths used here will be matched using a contains
473 rule so it is best to be as precise with the path as possible.
474 For example a path of '/src/generated/' will be searched as
475 '**/src/generated/**'.
476 Example: org/opendaylight/yang/gen,protobuff/messages
478 :licenses-allowed: Comma-separated list of allowed licenses.
479 (default: Apache-2.0,EPL-1.0,MIT)
481 .. _gjjb-packer-merge:
486 Packer Merge job runs `packer build` to build system images in the cloud.
489 - {project-name}-packer-merge-{platforms}-{templates}
490 - gerrit-packer-merge
491 - github-packer-merge
493 :Required parameters:
495 :build-node: The node to run build on.
496 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
497 be configured in defaults.yaml)
498 :mvn-settings: The name of settings file containing credentials for
500 :platforms: Platform or distribution to build. Typically json file
501 found in the packer/vars directory. (Example: centos)
502 :template: System template to build. Typically shell script found in
503 the packer/provision directory. (Example: java-builder)
505 :Optional parameters:
507 :cron: Time when the packer image should be rebuilt (default: @monthly)
508 :branch: Git branch to fetch for the build. (default: master)
509 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
510 :build-timeout: Timeout in minutes before aborting build. (default: 90)
511 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
512 :packer-cloud-settings: Name of settings file containing credentials
513 for the cloud that packer will build on. (default: packer-cloud-env)
514 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
515 :stream: Keyword that can be used to represent a release code-name.
516 Often the same as the branch. (default: master)
517 :submodule-recursive: Whether to checkout submodules recursively.
520 :gerrit_verify_triggers: Override Gerrit Triggers.
523 .. _gjjb-packer-verify:
528 Packer Verify job runs `packer validate` to verify packer configuration.
531 - {project-name}-packer-verify
532 - gerrit-packer-verify
533 - github-packer-verify
535 :Required parameters:
537 :build-node: The node to run build on.
538 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
539 be configured in defaults.yaml)
540 :mvn-settings: The name of settings file containing credentials for
543 :Optional parameters:
545 :branch: Git branch to fetch for the build. (default: master)
546 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
547 :build-timeout: Timeout in minutes before aborting build. (default: 10)
548 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
549 :packer-cloud-settings: Name of settings file containing credentials
550 for the cloud that packer will build on. (default: packer-cloud-env)
551 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
552 :stream: Keyword that can be used to represent a release code-name.
553 Often the same as the branch. (default: master)
554 :submodule-recursive: Whether to checkout submodules recursively.
557 :gerrit_verify_triggers: Override Gerrit Triggers.
558 :gerrit_trigger_file_paths: Override file paths which can be used to
559 filter which file modifications will trigger a build.