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:
241 Cloud configuration are managed via a directory structure in ci-management as
244 - jenkins-config/clouds/openstack/
245 - jenkins-config/clouds/openstack/cattle/cloud.cfg
246 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
247 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
248 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
250 The directory name inside of the "openstack" directory is used as the name of
251 the cloud configuration. In this case "cattle" is being used as the cloud name.
253 The ``cloud.cfg`` file is a special file used to configure the main cloud
254 configuration in the format ``KEY=value``.
258 :CLOUD_URL: API endpoint URL for Keystone.
260 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
261 :CLOUD_ZONE: OpenStack region to use. (default: "")
262 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
263 (default: "os-cloud")
264 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
266 :SANDBOX_CAP: Total number of instances the clodu will allow to
267 spin up. This applies to "sandbox" systems and overrides the
268 INSTANCE_CAP setting. (default: null)
270 :Template Parameters:
274 In the case of template definitions of a parameter below is not passed
275 the one defined in default clouds will be inherited.
277 :IMAGE_NAME: The image name to use for this template.
279 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
280 :HARDWARE_ID: OpenStack flavor to use. (default: "")
281 :NETWORK_ID: OpenStack network to use. (default: "")
282 :USER_DATA_ID: User Data to pass into the instance.
283 (default: jenkins-init-script)
284 :INSTANCE_CAP: Total number of instances of this type that can be launched
285 at one time. When defined in clouds.cfg it defines the total for the
286 entire cloud. (default: null)
287 :SANDBOX_CAP: Total number of instances of this type that can be launched
288 at one time. When defined in clouds.cfg it defines the total for the
289 entire cloud. This applies to "sandbox" systems and overrides the
290 INSTANCE_CAP setting. (default: null)
291 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
292 :SECURITY_GROUPS: Security group to use. (default: "default")
293 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
294 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
295 provisioned and connected. (default: 600000)
296 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
298 :NUM_EXECUTORS: Number of executors to enable for the instance.
300 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
301 :FS_ROOT: File system root for the workspace. (default: "/w")
302 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
303 again before it's removed. If set to -1, the slave will be kept
304 forever. (default: 0)
306 For a live example see the OpenDaylight project jenkins-config directory.
307 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
312 :Cloud Configuration:
314 The directory ``groovy-inserts`` contains the groovy script output that is
315 used to push to Jenkins. In the event of a job failure this file can be
322 Deploy jobs to jenkins-sandbox system via code review comment
324 This job checks out the current code review patch and then runs a
325 `jenkins-jobs update` to push a patch defined by the comment.
329 - {project-name}-jjb-deploy-job
330 - gerrit-jjb-deploy-job
331 - github-jjb-deploy-job
333 :Comment Trigger: jjb-deploy JOB_NAME
337 JOB_NAME can include the * wildcard character to push multiple jobs
338 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
339 all builder-jjb-* jobs to the sandbox system.
341 :Required parameters:
343 :build-node: The node to run build on.
344 :jenkins-ssh-credential: Credential to use for SSH. (Generally
345 should be configured in defaults.yaml)
347 :Optional parameters:
349 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
350 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
356 Runs `jenkins-jobs update` to update production job configuration
359 - {project-name}-jjb-merge
363 :Required parameters:
365 :build-node: The node to run build on.
366 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
367 be configured in defaults.yaml)
368 :mvn-settings: The name of settings file containing credentials for
371 :Optional parameters:
373 :branch: Git branch to fetch for the build. (default: master)
374 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
375 :build-timeout: Timeout in seconds before aborting build. (default: 10)
376 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
377 :stream: Keyword that can be used to represent a release code-name.
378 Often the same as the branch. (default: master)
379 :submodule-recursive: Whether to checkout submodules recursively.
382 :gerrit_merge_triggers: Override Gerrit Triggers.
383 :gerrit_trigger_file_paths: Override file paths which can be used to
384 filter which file modifications will trigger a build.
385 (default defined by lf_jjb_common)
391 Runs `jenkins-jobs test` to validate JJB syntax
394 - {project-name}-jjb-verify
398 :Required parameters:
400 :build-node: The node to run build on.
401 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
402 be configured in defaults.yaml)
403 :mvn-settings: The name of settings file containing credentials for
406 :Optional parameters:
408 :branch: Git branch to fetch for the build. (default: master)
409 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
410 :build-timeout: Timeout in seconds before aborting build. (default: 10)
411 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
412 :stream: Keyword that can be used to represent a release code-name.
413 Often the same as the branch. (default: master)
414 :submodule-recursive: Whether to checkout submodules recursively.
417 :gerrit_verify_triggers: Override Gerrit Triggers.
418 :gerrit_trigger_file_paths: Override file paths which can be used to
419 filter which file modifications will trigger a build.
420 (default defined by lf_jjb_common)
422 .. _info-yaml-verify:
427 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
428 other file changes. Verifies INFO.yaml files follow the schema defined in
429 `global-jjb/info-schema`.
432 - {project-name}-info-yaml-verify
433 - gerrit-info-yaml-verify
434 - github-info-yaml-verify
436 :Required parameters:
438 :build-node: The node to run build on.
439 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
440 be configured in defaults.yaml)
442 :Optional parameters:
444 :branch: Git branch to fetch for the build. (default: master)
445 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
446 :build-timeout: Timeout in seconds before aborting build. (default: 10)
447 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
448 :stream: Keyword that can be used to represent a release code-name.
449 Often the same as the branch. (default: master)
450 :submodule-recursive: Whether to checkout submodules recursively.
452 :gerrit_verify_triggers: Override Gerrit Triggers.
459 Job to scan projects for files missing license headers.
462 - {project-name}-license-check
463 - gerrit-license-check
464 - github-license-check
466 :Optional parameters:
468 :file-patterns: Space-separated list of file patterns to scan.
469 (default: \*.go \*.groovy \*.java \*.py \*.sh)
470 :spdx-disable: Disable the SPDX-Identifier checker. (default: false)
471 :lhc-version: Version of LHC to use. (default: 0.2.0)
472 :license-exclude-paths: Comma-separated list of paths to exclude from the
473 license checker. The paths used here will be matched using a contains
474 rule so it is best to be as precise with the path as possible.
475 For example a path of '/src/generated/' will be searched as
476 '**/src/generated/**'.
477 Example: org/opendaylight/yang/gen,protobuff/messages
479 :licenses-allowed: Comma-separated list of allowed licenses.
480 (default: Apache-2.0,EPL-1.0,MIT)
482 .. _gjjb-packer-merge:
487 Packer Merge job runs `packer build` to build system images in the cloud.
490 - {project-name}-packer-merge-{platforms}-{templates}
491 - gerrit-packer-merge
492 - github-packer-merge
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)
499 :mvn-settings: The name of settings file containing credentials for
501 :platforms: Platform or distribution to build. Typically json file
502 found in the packer/vars directory. (Example: centos)
503 :template: System template to build. Typically shell script found in
504 the packer/provision directory. (Example: java-builder)
506 :Optional parameters:
508 :cron: Time when the packer image should be rebuilt (default: @monthly)
509 :branch: Git branch to fetch for the build. (default: master)
510 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
511 :build-timeout: Timeout in seconds before aborting build. (default: 10)
512 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
513 :packer-cloud-settings: Name of settings file containing credentials
514 for the cloud that packer will build on. (default: packer-cloud-env)
515 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
516 :stream: Keyword that can be used to represent a release code-name.
517 Often the same as the branch. (default: master)
518 :submodule-recursive: Whether to checkout submodules recursively.
521 :gerrit_verify_triggers: Override Gerrit Triggers.
524 .. _gjjb-packer-verify:
529 Packer Verify job runs `packer validate` to verify packer configuration.
532 - {project-name}-packer-verify
533 - gerrit-packer-verify
534 - github-packer-verify
536 :Required parameters:
538 :build-node: The node to run build on.
539 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
540 be configured in defaults.yaml)
541 :mvn-settings: The name of settings file containing credentials for
544 :Optional parameters:
546 :branch: Git branch to fetch for the build. (default: master)
547 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
548 :build-timeout: Timeout in seconds before aborting build. (default: 10)
549 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
550 :packer-cloud-settings: Name of settings file containing credentials
551 for the cloud that packer will build on. (default: packer-cloud-env)
552 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
553 :stream: Keyword that can be used to represent a release code-name.
554 Often the same as the branch. (default: master)
555 :submodule-recursive: Whether to checkout submodules recursively.
558 :gerrit_verify_triggers: Override Gerrit Triggers.
559 :gerrit_trigger_file_paths: Override file paths which can be used to
560 filter which file modifications will trigger a build.