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-jenkins-cfg-global-vars
74 --------------------------
76 Manages the Global Jenkins variables. This macro will clear all exist macros
77 in Jenkins and replaces them with the ones defined by the
78 ci-management/jenkins-config/global-vars-SILO.sh script.
82 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
83 config definitions for "production" and "sandbox" systems.
87 :jenkins-silos: Space separated list of Jenkins silos to update
88 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
93 Provides jenkins_jobs.ini configuration for Jenkins.
95 lf-infra-jjbini-sandbox
96 -----------------------
98 Provides jenkins_jobs.ini configuration for Jenkins sandbox.
100 .. todo:: This needs to be consolidated into lf-infra-jjbini when JJB 2.0 is available
105 Common packer configuration.
110 Gerrit file-paths for packer jobs.
115 Parameters useful for packer related tasks.
119 :packer-version: Version of packer to install / use.
120 (shell: PACKER_VERSION)
122 lf-packer-verify-file-paths
123 ---------------------------
125 Gerrit file-paths for packer verify jobs.
133 Job submits a patch to lock or unlock a project's branch.
136 - {project-name}-gerrit-branch-lock-{stream}
140 .. _lf-global-jjb-jenkins-cfg-merge:
142 Jenkins Configuration Merge
143 ---------------------------
145 Jenkins job to manage Global Jenkins configuration.
149 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
150 config definitions for "production" and "sandbox" systems.
154 - {project-name}-jenkins-cfg-merge
155 - gerrit-jenkins-cfg-merge
156 - github-jenkins-cfg-merge
158 :Optional parameters:
160 :branch: Git branch to build against. (default: master)
161 :cron: How often to run the job on a cron schedule. (default: @daily)
162 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
163 :jenkins-silos: Space separated list of Jenkins silos to update
164 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
165 (default: production sandbox)
167 Typically this template is automatically pulled in by the
168 "{project-name}-ci-jobs" job-group and does not need to be explicitly called if
169 the job group is being used.
173 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
178 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-full.yaml
181 .. _jenkins-cfg-envvar:
183 Global Environment Variables
184 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 Global Environment Variables are managed via the
187 ``jenkins-config/global-vars-SILO.sh`` file in ci-management. Replace SILO with
188 the name of the Jenkins silo the variable configuration is for.
190 The format for this file is ``KEY=value`` for example::
192 GERRIT_URL=https://git.opendaylight.org/gerrit
193 GIT_BASE=git://devvexx.opendaylight.org/mirror/$PROJECT
194 GIT_URL=git://devvexx.opendaylight.org/mirror
195 JENKINS_HOSTNAME=vex-yul-odl-jenkins-2
196 LOGS_SERVER=https://logs.opendaylight.org
197 NEXUS_URL=https://nexus.opendaylight.org
198 ODLNEXUSPROXY=https://nexus.opendaylight.org
200 SONAR_URL=https://sonar.opendaylight.org
205 This configuration requires the OpenStack Cloud plugin in Jenkins and is
206 currently the only cloud plugin supported.
208 OpenStack Cloud plugin version supported:
217 Cloud configuration are managed via a directory structure in ci-management as
220 - jenkins-config/clouds/openstack/
221 - jenkins-config/clouds/openstack/cattle/cloud.cfg
222 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
223 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
224 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
226 The directory name inside of the "openstack" directory is used as the name of
227 the cloud configuration. In this case "cattle" is being used as the cloud name.
229 The ``cloud.cfg`` file is a special file used to configure the main cloud
230 configuration in the format ``KEY=value``.
234 :CLOUD_URL: API endpoint URL for Keystone.
236 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
237 :CLOUD_ZONE: OpenStack region to use. (default: "")
238 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
239 (default: "os-cloud")
240 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
242 :SANDBOX_CAP: Total number of instances the clodu will allow to
243 spin up. This applies to "sandbox" systems and overrides the
244 INSTANCE_CAP setting. (default: null)
246 :Template Parameters:
250 In the case of template definitions of a parameter below is not passed
251 the one defined in default clouds will be inherited.
253 :IMAGE_NAME: The image name to use for this template.
255 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
256 :HARDWARE_ID: OpenStack flavor to use. (default: "")
257 :NETWORK_ID: OpenStack network to use. (default: "")
258 :USER_DATA_ID: User Data to pass into the instance.
259 (default: jenkins-init-script)
260 :INSTANCE_CAP: Total number of instances of this type that can be launched
261 at one time. When defined in clouds.cfg it defines the total for the
262 entire cloud. (default: null)
263 :SANDBOX_CAP: Total number of instances of this type that can be launched
264 at one time. When defined in clouds.cfg it defines the total for the
265 entire cloud. This applies to "sandbox" systems and overrides the
266 INSTANCE_CAP setting. (default: null)
267 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
268 :SECURITY_GROUPS: Security group to use. (default: "default")
269 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
270 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
271 provisioned and connected. (default: 600000)
272 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
274 :NUM_EXECUTORS: Number of executors to enable for the instance.
276 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
277 :FS_ROOT: File system root for the workspace. (default: "/w")
278 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
279 again before it's removed. If set to -1, the slave will be kept
280 forever. (default: 0)
282 For a live example see the OpenDaylight project jenkins-config directory.
283 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
288 :Cloud Configuration:
290 The directory ``groovy-inserts`` contains the groovy script output that is
291 used to push to Jenkins. In the event of a job failure this file can be
298 Deploy jobs to jenkins-sandbox system via code review comment
300 This job checks out the current code review patch and then runs a
301 `jenkins-jobs update` to push a patch defined by the comment.
305 - {project-name}-jjb-deploy-job
306 - gerrit-jjb-deploy-job
307 - github-jjb-deploy-job
309 :Comment Trigger: jjb-deploy JOB_NAME
313 JOB_NAME can include the * wildcard character to push multiple jobs
314 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
315 all builder-jjb-* jobs to the sandbox system.
317 :Required parameters:
319 :build-node: The node to run build on.
320 :jenkins-ssh-credential: Credential to use for SSH. (Generally
321 should be configured in defaults.yaml)
323 :Optional parameters:
325 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
326 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
332 Runs `jenkins-jobs update` to update production job configuration
335 - {project-name}-jjb-merge
339 :Required parameters:
341 :build-node: The node to run build on.
342 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
343 be configured in defaults.yaml)
344 :mvn-settings: The name of settings file containing credentials for
347 :Optional parameters:
349 :branch: Git branch to fetch for the build. (default: master)
350 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
351 :build-timeout: Timeout in seconds before aborting build. (default: 10)
352 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
353 :stream: Keyword that can be used to represent a release code-name.
354 Often the same as the branch. (default: master)
355 :submodule-recursive: Whether to checkout submodules recursively.
358 :gerrit_merge_triggers: Override Gerrit Triggers.
359 :gerrit_trigger_file_paths: Override file paths which can be used to
360 filter which file modifications will trigger a build.
361 (default defined by lf_jjb_common)
367 Runs `jenkins-jobs test` to validate JJB syntax
370 - {project-name}-jjb-verify
374 :Required parameters:
376 :build-node: The node to run build on.
377 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
378 be configured in defaults.yaml)
379 :mvn-settings: The name of settings file containing credentials for
382 :Optional parameters:
384 :branch: Git branch to fetch for the build. (default: master)
385 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
386 :build-timeout: Timeout in seconds before aborting build. (default: 10)
387 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
388 :stream: Keyword that can be used to represent a release code-name.
389 Often the same as the branch. (default: master)
390 :submodule-recursive: Whether to checkout submodules recursively.
393 :gerrit_verify_triggers: Override Gerrit Triggers.
394 :gerrit_trigger_file_paths: Override file paths which can be used to
395 filter which file modifications will trigger a build.
396 (default defined by lf_jjb_common)
398 .. _info-yaml-verify:
403 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
404 other file changes. Verifies INFO.yaml files follow the schema defined in
405 `global-jjb/info-schema`.
408 - {project-name}-info-yaml-verify
409 - gerrit-info-yaml-verify
410 - github-info-yaml-verify
412 :Required parameters:
414 :build-node: The node to run build on.
415 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
416 be configured in defaults.yaml)
418 :Optional parameters:
420 :branch: Git branch to fetch for the build. (default: master)
421 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
422 :build-timeout: Timeout in seconds before aborting build. (default: 10)
423 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
424 :stream: Keyword that can be used to represent a release code-name.
425 Often the same as the branch. (default: master)
426 :submodule-recursive: Whether to checkout submodules recursively.
428 :gerrit_verify_triggers: Override Gerrit Triggers.
435 Job to scan projects for files missing license headers.
438 - {project-name}-license-check
439 - gerrit-license-check
440 - github-license-check
442 :Optional parameters:
444 :file-patterns: Space-separated list of file patterns to scan.
445 (default: \*.go \*.groovy \*.java \*.py \*.sh)
446 :spdx-disable: Disable the SPDX-Identifier checker. (default: false)
447 :lhc-version: Version of LHC to use. (default: 0.2.0)
448 :license-exclude-paths: Comma-separated list of paths to exclude from the
449 license checker. The paths used here will be matched using a contains
450 rule so it is best to be as precise with the path as possible.
451 For example a path of '/src/generated/' will be searched as
452 '**/src/generated/**'.
453 Example: org/opendaylight/yang/gen,protobuff/messages
455 :licenses-allowed: Comma-separated list of allowed licenses.
456 (default: Apache-2.0,EPL-1.0,MIT)
458 .. _gjjb-packer-merge:
463 Packer Merge job runs `packer build` to build system images in the cloud.
466 - {project-name}-packer-merge-{platforms}-{templates}
467 - gerrit-packer-merge
468 - github-packer-merge
470 :Required parameters:
472 :build-node: The node to run build on.
473 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
474 be configured in defaults.yaml)
475 :mvn-settings: The name of settings file containing credentials for
477 :platforms: Platform or distribution to build. Typically json file
478 found in the packer/vars directory. (Example: centos)
479 :template: System template to build. Typically shell script found in
480 the packer/provision directory. (Example: java-builder)
482 :Optional parameters:
484 :cron: Time when the packer image should be rebuilt (default: @monthly)
485 :branch: Git branch to fetch for the build. (default: master)
486 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
487 :build-timeout: Timeout in seconds before aborting build. (default: 10)
488 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
489 :packer-cloud-settings: Name of settings file containing credentials
490 for the cloud that packer will build on. (default: packer-cloud-env)
491 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
492 :stream: Keyword that can be used to represent a release code-name.
493 Often the same as the branch. (default: master)
494 :submodule-recursive: Whether to checkout submodules recursively.
497 :gerrit_verify_triggers: Override Gerrit Triggers.
500 .. _gjjb-packer-verify:
505 Packer Verify job runs `packer validate` to verify packer configuration.
508 - {project-name}-packer-verify
509 - gerrit-packer-verify
510 - github-packer-verify
512 :Required parameters:
514 :build-node: The node to run build on.
515 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
516 be configured in defaults.yaml)
517 :mvn-settings: The name of settings file containing credentials for
520 :Optional parameters:
522 :branch: Git branch to fetch for the build. (default: master)
523 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
524 :build-timeout: Timeout in seconds before aborting build. (default: 10)
525 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
526 :packer-cloud-settings: Name of settings file containing credentials
527 for the cloud that packer will build on. (default: packer-cloud-env)
528 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
529 :stream: Keyword that can be used to represent a release code-name.
530 Often the same as the branch. (default: master)
531 :submodule-recursive: Whether to checkout submodules recursively.
534 :gerrit_verify_triggers: Override Gerrit Triggers.
535 :gerrit_trigger_file_paths: Override file paths which can be used to
536 filter which file modifications will trigger a build.