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:
216 Cloud configuration are managed via a directory structure in ci-management as
219 - jenkins-config/clouds/openstack/
220 - jenkins-config/clouds/openstack/cattle/cloud.cfg
221 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
222 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
223 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
225 The directory name inside of the "openstack" directory is used as the name of
226 the cloud configuration. In this case "cattle" is being used as the cloud name.
228 The ``cloud.cfg`` file is a special file used to configure the main cloud
229 configuration in the format ``KEY=value``.
233 :CLOUD_URL: API endpoint URL for Keystone.
235 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
236 :CLOUD_ZONE: OpenStack region to use. (default: "")
237 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
238 (default: "os-cloud")
239 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
241 :SANDBOX_CAP: Total number of instances the clodu will allow to
242 spin up. This applies to "sandbox" systems and overrides the
243 INSTANCE_CAP setting. (default: null)
245 :Template Parameters:
249 In the case of template definitions of a parameter below is not passed
250 the one defined in default clouds will be inherited.
252 :IMAGE_NAME: The image name to use for this template.
254 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
255 :HARDWARE_ID: OpenStack flavor to use. (default: "")
256 :NETWORK_ID: OpenStack network to use. (default: "")
257 :USER_DATA_ID: User Data to pass into the instance.
258 (default: jenkins-init-script)
259 :INSTANCE_CAP: Total number of instances of this type that can be launched
260 at one time. When defined in clouds.cfg it defines the total for the
261 entire cloud. (default: null)
262 :SANDBOX_CAP: Total number of instances of this type that can be launched
263 at one time. When defined in clouds.cfg it defines the total for the
264 entire cloud. This applies to "sandbox" systems and overrides the
265 INSTANCE_CAP setting. (default: null)
266 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
267 :SECURITY_GROUPS: Security group to use. (default: "default")
268 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
269 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
270 provisioned and connected. (default: 600000)
271 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
273 :NUM_EXECUTORS: Number of executors to enable for the instance.
275 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
276 :FS_ROOT: File system root for the workspace. (default: "/w")
277 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
278 again before it's removed. If set to -1, the slave will be kept
279 forever. (default: 0)
281 For a live example see the OpenDaylight project jenkins-config directory.
282 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
287 :Cloud Configuration:
289 The directory ``groovy-inserts`` contains the groovy script output that is
290 used to push to Jenkins. In the event of a job failure this file can be
297 Deploy jobs to jenkins-sandbox system via code review comment
299 This job checks out the current code review patch and then runs a
300 `jenkins-jobs update` to push a patch defined by the comment.
304 - {project-name}-jjb-deploy-job
305 - gerrit-jjb-deploy-job
306 - github-jjb-deploy-job
308 :Comment Trigger: jjb-deploy JOB_NAME
312 JOB_NAME can include the * wildcard character to push multiple jobs
313 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
314 all builder-jjb-* jobs to the sandbox system.
316 :Required parameters:
318 :build-node: The node to run build on.
319 :jenkins-ssh-credential: Credential to use for SSH. (Generally
320 should be configured in defaults.yaml)
322 :Optional parameters:
324 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
325 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
331 Runs `jenkins-jobs update` to update production job configuration
334 - {project-name}-jjb-merge
338 :Required parameters:
340 :build-node: The node to run build on.
341 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
342 be configured in defaults.yaml)
343 :mvn-settings: The name of settings file containing credentials for
346 :Optional parameters:
348 :branch: Git branch to fetch for the build. (default: master)
349 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
350 :build-timeout: Timeout in seconds before aborting build. (default: 10)
351 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
352 :stream: Keyword that can be used to represent a release code-name.
353 Often the same as the branch. (default: master)
354 :submodule-recursive: Whether to checkout submodules recursively.
357 :gerrit_merge_triggers: Override Gerrit Triggers.
358 :gerrit_trigger_file_paths: Override file paths which can be used to
359 filter which file modifications will trigger a build.
360 (default defined by lf_jjb_common)
366 Runs `jenkins-jobs test` to validate JJB syntax
369 - {project-name}-jjb-verify
373 :Required parameters:
375 :build-node: The node to run build on.
376 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
377 be configured in defaults.yaml)
378 :mvn-settings: The name of settings file containing credentials for
381 :Optional parameters:
383 :branch: Git branch to fetch for the build. (default: master)
384 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
385 :build-timeout: Timeout in seconds before aborting build. (default: 10)
386 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
387 :stream: Keyword that can be used to represent a release code-name.
388 Often the same as the branch. (default: master)
389 :submodule-recursive: Whether to checkout submodules recursively.
392 :gerrit_verify_triggers: Override Gerrit Triggers.
393 :gerrit_trigger_file_paths: Override file paths which can be used to
394 filter which file modifications will trigger a build.
395 (default defined by lf_jjb_common)
397 .. _info-yaml-verify:
402 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
403 other file changes. Verifies INFO.yaml files follow the schema defined in
404 `global-jjb/info-schema`.
407 - {project-name}-info-yaml-verify
408 - gerrit-info-yaml-verify
409 - github-info-yaml-verify
411 :Required parameters:
413 :build-node: The node to run build on.
414 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
415 be configured in defaults.yaml)
417 :Optional parameters:
419 :branch: Git branch to fetch for the build. (default: master)
420 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
421 :build-timeout: Timeout in seconds before aborting build. (default: 10)
422 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
423 :stream: Keyword that can be used to represent a release code-name.
424 Often the same as the branch. (default: master)
425 :submodule-recursive: Whether to checkout submodules recursively.
427 :gerrit_verify_triggers: Override Gerrit Triggers.
429 .. _gjjb-packer-merge:
434 Packer Merge job runs `packer build` to build system images in the cloud.
437 - {project-name}-packer-merge-{platforms}-{templates}
438 - gerrit-packer-merge
439 - github-packer-merge
441 :Required parameters:
443 :build-node: The node to run build on.
444 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
445 be configured in defaults.yaml)
446 :mvn-settings: The name of settings file containing credentials for
448 :platforms: Platform or distribution to build. Typically json file
449 found in the packer/vars directory. (Example: centos)
450 :template: System template to build. Typically shell script found in
451 the packer/provision directory. (Example: java-builder)
453 :Optional parameters:
455 :cron: Time when the packer image should be rebuilt (default: @monthly)
456 :branch: Git branch to fetch for the build. (default: master)
457 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
458 :build-timeout: Timeout in seconds before aborting build. (default: 10)
459 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
460 :packer-cloud-settings: Name of settings file containing credentials
461 for the cloud that packer will build on. (default: packer-cloud-env)
462 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
463 :stream: Keyword that can be used to represent a release code-name.
464 Often the same as the branch. (default: master)
465 :submodule-recursive: Whether to checkout submodules recursively.
468 :gerrit_verify_triggers: Override Gerrit Triggers.
471 .. _gjjb-packer-verify:
476 Packer Verify job runs `packer validate` to verify packer configuration.
479 - {project-name}-packer-verify
480 - gerrit-packer-verify
481 - github-packer-verify
483 :Required parameters:
485 :build-node: The node to run build on.
486 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
487 be configured in defaults.yaml)
488 :mvn-settings: The name of settings file containing credentials for
491 :Optional parameters:
493 :branch: Git branch to fetch for the build. (default: master)
494 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
495 :build-timeout: Timeout in seconds before aborting build. (default: 10)
496 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
497 :packer-cloud-settings: Name of settings file containing credentials
498 for the cloud that packer will build on. (default: packer-cloud-env)
499 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
500 :stream: Keyword that can be used to represent a release code-name.
501 Often the same as the branch. (default: master)
502 :submodule-recursive: Whether to checkout submodules recursively.
505 :gerrit_verify_triggers: Override Gerrit Triggers.
506 :gerrit_trigger_file_paths: Override file paths which can be used to
507 filter which file modifications will trigger a build.