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:
240 Cloud configuration are managed via a directory structure in ci-management as
243 - jenkins-config/clouds/openstack/
244 - jenkins-config/clouds/openstack/cattle/cloud.cfg
245 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
246 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
247 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
249 The directory name inside of the "openstack" directory is used as the name of
250 the cloud configuration. In this case "cattle" is being used as the cloud name.
252 The ``cloud.cfg`` file is a special file used to configure the main cloud
253 configuration in the format ``KEY=value``.
257 :CLOUD_URL: API endpoint URL for Keystone.
259 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
260 :CLOUD_ZONE: OpenStack region to use. (default: "")
261 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
262 (default: "os-cloud")
263 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
265 :SANDBOX_CAP: Total number of instances the clodu will allow to
266 spin up. This applies to "sandbox" systems and overrides the
267 INSTANCE_CAP setting. (default: null)
269 :Template Parameters:
273 In the case of template definitions of a parameter below is not passed
274 the one defined in default clouds will be inherited.
276 :IMAGE_NAME: The image name to use for this template.
278 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
279 :HARDWARE_ID: OpenStack flavor to use. (default: "")
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)
305 For a live example see the OpenDaylight project jenkins-config directory.
306 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
311 :Cloud Configuration:
313 The directory ``groovy-inserts`` contains the groovy script output that is
314 used to push to Jenkins. In the event of a job failure this file can be
321 Deploy jobs to jenkins-sandbox system via code review comment
323 This job checks out the current code review patch and then runs a
324 `jenkins-jobs update` to push a patch defined by the comment.
328 - {project-name}-jjb-deploy-job
329 - gerrit-jjb-deploy-job
330 - github-jjb-deploy-job
332 :Comment Trigger: jjb-deploy JOB_NAME
336 JOB_NAME can include the * wildcard character to push multiple jobs
337 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
338 all builder-jjb-* jobs to the sandbox system.
340 :Required parameters:
342 :build-node: The node to run build on.
343 :jenkins-ssh-credential: Credential to use for SSH. (Generally
344 should be configured in defaults.yaml)
346 :Optional parameters:
348 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
349 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
355 Runs `jenkins-jobs update` to update production job configuration
358 - {project-name}-jjb-merge
362 :Required parameters:
364 :build-node: The node to run build on.
365 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
366 be configured in defaults.yaml)
367 :mvn-settings: The name of settings file containing credentials for
370 :Optional parameters:
372 :branch: Git branch to fetch for the build. (default: master)
373 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
374 :build-timeout: Timeout in seconds before aborting build. (default: 10)
375 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
376 :stream: Keyword that can be used to represent a release code-name.
377 Often the same as the branch. (default: master)
378 :submodule-recursive: Whether to checkout submodules recursively.
381 :gerrit_merge_triggers: Override Gerrit Triggers.
382 :gerrit_trigger_file_paths: Override file paths which can be used to
383 filter which file modifications will trigger a build.
384 (default defined by lf_jjb_common)
390 Runs `jenkins-jobs test` to validate JJB syntax
393 - {project-name}-jjb-verify
397 :Required parameters:
399 :build-node: The node to run build on.
400 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
401 be configured in defaults.yaml)
402 :mvn-settings: The name of settings file containing credentials for
405 :Optional parameters:
407 :branch: Git branch to fetch for the build. (default: master)
408 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
409 :build-timeout: Timeout in seconds before aborting build. (default: 10)
410 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
411 :stream: Keyword that can be used to represent a release code-name.
412 Often the same as the branch. (default: master)
413 :submodule-recursive: Whether to checkout submodules recursively.
416 :gerrit_verify_triggers: Override Gerrit Triggers.
417 :gerrit_trigger_file_paths: Override file paths which can be used to
418 filter which file modifications will trigger a build.
419 (default defined by lf_jjb_common)
421 .. _info-yaml-verify:
426 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
427 other file changes. Verifies INFO.yaml files follow the schema defined in
428 `global-jjb/info-schema`.
431 - {project-name}-info-yaml-verify
432 - gerrit-info-yaml-verify
433 - github-info-yaml-verify
435 :Required parameters:
437 :build-node: The node to run build on.
438 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
439 be configured in defaults.yaml)
441 :Optional parameters:
443 :branch: Git branch to fetch for the build. (default: master)
444 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
445 :build-timeout: Timeout in seconds before aborting build. (default: 10)
446 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
447 :stream: Keyword that can be used to represent a release code-name.
448 Often the same as the branch. (default: master)
449 :submodule-recursive: Whether to checkout submodules recursively.
451 :gerrit_verify_triggers: Override Gerrit Triggers.
453 .. _gjjb-packer-merge:
458 Packer Merge job runs `packer build` to build system images in the cloud.
461 - {project-name}-packer-merge-{platforms}-{templates}
462 - gerrit-packer-merge
463 - github-packer-merge
465 :Required parameters:
467 :build-node: The node to run build on.
468 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
469 be configured in defaults.yaml)
470 :mvn-settings: The name of settings file containing credentials for
472 :platforms: Platform or distribution to build. Typically json file
473 found in the packer/vars directory. (Example: centos)
474 :template: System template to build. Typically shell script found in
475 the packer/provision directory. (Example: java-builder)
477 :Optional parameters:
479 :cron: Time when the packer image should be rebuilt (default: @monthly)
480 :branch: Git branch to fetch for the build. (default: master)
481 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
482 :build-timeout: Timeout in seconds before aborting build. (default: 10)
483 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
484 :packer-cloud-settings: Name of settings file containing credentials
485 for the cloud that packer will build on. (default: packer-cloud-env)
486 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
487 :stream: Keyword that can be used to represent a release code-name.
488 Often the same as the branch. (default: master)
489 :submodule-recursive: Whether to checkout submodules recursively.
492 :gerrit_verify_triggers: Override Gerrit Triggers.
495 .. _gjjb-packer-verify:
500 Packer Verify job runs `packer validate` to verify packer configuration.
503 - {project-name}-packer-verify
504 - gerrit-packer-verify
505 - github-packer-verify
507 :Required parameters:
509 :build-node: The node to run build on.
510 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
511 be configured in defaults.yaml)
512 :mvn-settings: The name of settings file containing credentials for
515 :Optional parameters:
517 :branch: Git branch to fetch for the build. (default: master)
518 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
519 :build-timeout: Timeout in seconds before aborting build. (default: 10)
520 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
521 :packer-cloud-settings: Name of settings file containing credentials
522 for the cloud that packer will build on. (default: packer-cloud-env)
523 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
524 :stream: Keyword that can be used to represent a release code-name.
525 Often the same as the branch. (default: master)
526 :submodule-recursive: Whether to checkout submodules recursively.
529 :gerrit_verify_triggers: Override Gerrit Triggers.
530 :gerrit_trigger_file_paths: Override file paths which can be used to
531 filter which file modifications will trigger a build.