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}-packer-jobs
33 --------------------------
35 Jobs related to Packer builds for CI using Gerrit.
40 - gerrit-packer-verify
42 {project-name}-github-packer-jobs
43 ---------------------------------
45 Jobs related to Packer builds for CI using GitHub.
50 - github-packer-verify
55 lf-jenkins-cfg-global-vars
56 --------------------------
58 Manages the Global Jenkins variables. This macro will clear all exist macros
59 in Jenkins and replaces them with the ones defined by the
60 ci-management/jenkins-config/global-vars-SILO.sh script.
64 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
65 config definitions for "production" and "sandbox" systems.
69 :jenkins-silos: Space separated list of Jenkins silos to update
70 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
75 Provides jenkins_jobs.ini configuration for Jenkins.
77 lf-infra-jjbini-sandbox
78 -----------------------
80 Provides jenkins_jobs.ini configuration for Jenkins sandbox.
82 .. todo:: This needs to be consolidated into lf-infra-jjbini when JJB 2.0 is available
87 Common packer configuration.
92 Gerrit file-paths for packer jobs.
97 Parameters useful for packer related tasks.
101 :packer-version: Version of packer to install / use.
102 (shell: PACKER_VERSION)
104 lf-packer-verify-file-paths
105 ---------------------------
107 Gerrit file-paths for packer verify jobs.
115 Job submits a patch to lock or unlock a project's branch.
118 - {project-name}-gerrit-branch-lock-{stream}
122 .. _lf-global-jjb-jenkins-cfg-merge:
124 Jenkins Configuration Merge
125 ---------------------------
127 Jenkins job to manage Global Jenkins configuration.
131 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
132 config definitions for "production" and "sandbox" systems.
136 - {project-name}-jenkins-cfg-merge
137 - gerrit-jenkins-cfg-merge
138 - github-jenkins-cfg-merge
140 :Optional parameters:
142 :branch: Git branch to build against. (default: master)
143 :cron: How often to run the job on a cron schedule. (default: @daily)
144 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
145 :jenkins-silos: Space separated list of Jenkins silos to update
146 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
147 (default: production sandbox)
149 Typically this template is automatically pulled in by the
150 "{project-name}-ci-jobs" job-group and does not need to be explicitly called if
151 the job group is being used.
155 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
160 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-full.yaml
163 .. _jenkins-cfg-envvar:
165 Global Environment Variables
166 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
168 Global Environment Variables are managed via the
169 ``jenkins-config/global-vars-SILO.sh`` file in ci-management. Replace SILO with
170 the name of the Jenkins silo the variable configuration is for.
172 The format for this file is ``KEY=value`` for example::
174 GERRIT_URL=https://git.opendaylight.org/gerrit
175 GIT_BASE=git://devvexx.opendaylight.org/mirror/$PROJECT
176 GIT_URL=git://devvexx.opendaylight.org/mirror
177 JENKINS_HOSTNAME=vex-yul-odl-jenkins-2
178 LOGS_SERVER=https://logs.opendaylight.org
179 NEXUS_URL=https://nexus.opendaylight.org
180 ODLNEXUSPROXY=https://nexus.opendaylight.org
182 SONAR_URL=https://sonar.opendaylight.org
187 This configuration requires the OpenStack Cloud plugin in Jenkins and is
188 currently the only cloud plugin supported.
190 OpenStack Cloud plugin version supported:
196 Cloud configuration are managed via a directory structure in ci-management as
199 - jenkins-config/clouds/openstack/
200 - jenkins-config/clouds/openstack/cattle/cloud.cfg
201 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
202 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
203 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
205 The directory name inside of the "openstack" directory is used as the name of
206 the cloud configuration. In this case "cattle" is being used as the cloud name.
208 The ``cloud.cfg`` file is a special file used to configure the main cloud
209 configuration in the format ``KEY=value``.
213 :CLOUD_URL: API endpoint URL for Keystone.
215 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
216 :CLOUD_ZONE: OpenStack region to use. (default: "")
217 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
218 (default: "os-cloud")
219 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
221 :SANDBOX_CAP: Total number of instances the clodu will allow to
222 spin up. This applies to "sandbox" systems and overrides the
223 INSTANCE_CAP setting. (default: null)
225 :Template Parameters:
229 In the case of template definitions of a parameter below is not passed
230 the one defined in default clouds will be inherited.
232 :IMAGE_NAME: The image name to use for this template.
234 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
235 :HARDWARE_ID: OpenStack flavor to use. (default: "")
236 :NETWORK_ID: OpenStack network to use. (default: "")
237 :USER_DATA_ID: User Data to pass into the instance.
238 (default: jenkins-init-script)
239 :INSTANCE_CAP: Total number of instances of this type that can be launched
240 at one time. When defined in clouds.cfg it defines the total for the
241 entire cloud. (default: null)
242 :SANDBOX_CAP: Total number of instances of this type that can be launched
243 at one time. When defined in clouds.cfg it defines the total for the
244 entire cloud. This applies to "sandbox" systems and overrides the
245 INSTANCE_CAP setting. (default: null)
246 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
247 :SECURITY_GROUPS: Security group to use. (default: "default")
248 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
249 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
250 provisioned and connected. (default: 600000)
251 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
253 :NUM_EXECUTORS: Number of executors to enable for the instance.
255 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
256 :FS_ROOT: File system root for the workspace. (default: "/w")
257 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
258 again before it's removed. If set to -1, the slave will be kept
259 forever. (default: 0)
261 For a live example see the OpenDaylight project jenkins-config directory.
262 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
267 :Cloud Configuration:
269 The directory ``groovy-inserts`` contains the groovy script output that is
270 used to push to Jenkins. In the event of a job failure this file can be
277 Deploy jobs to jenkins-sandbox system via code review comment
279 This job checks out the current code review patch and then runs a
280 `jenkins-jobs update` to push a patch defined by the comment.
284 - {project-name}-jjb-deploy-job
285 - gerrit-jjb-deploy-job
286 - github-jjb-deploy-job
288 :Comment Trigger: jjb-deploy JOB_NAME
292 JOB_NAME can include the * wildcard character to push multiple jobs
293 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
294 all builder-jjb-* jobs to the sandbox system.
296 :Required parameters:
298 :build-node: The node to run build on.
299 :jenkins-ssh-credential: Credential to use for SSH. (Generally
300 should be configured in defaults.yaml)
302 :Optional parameters:
304 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
305 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
311 Runs `jenkins-jobs update` to update production job configuration
314 - {project-name}-jjb-merge
318 :Required parameters:
320 :build-node: The node to run build on.
321 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
322 be configured in defaults.yaml)
323 :mvn-settings: The name of settings file containing credentials for
326 :Optional parameters:
328 :branch: Git branch to fetch for the build. (default: master)
329 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
330 :build-timeout: Timeout in seconds before aborting build. (default: 10)
331 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
332 :stream: Keyword that can be used to represent a release code-name.
333 Often the same as the branch. (default: master)
334 :submodule-recursive: Whether to checkout submodules recursively.
337 :gerrit_merge_triggers: Override Gerrit Triggers.
338 :gerrit_trigger_file_paths: Override file paths which can be used to
339 filter which file modifications will trigger a build.
340 (default defined by lf_jjb_common)
346 Runs `jenkins-jobs test` to validate JJB syntax
349 - {project-name}-jjb-verify
353 :Required parameters:
355 :build-node: The node to run build on.
356 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
357 be configured in defaults.yaml)
358 :mvn-settings: The name of settings file containing credentials for
361 :Optional parameters:
363 :branch: Git branch to fetch for the build. (default: master)
364 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
365 :build-timeout: Timeout in seconds before aborting build. (default: 10)
366 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
367 :stream: Keyword that can be used to represent a release code-name.
368 Often the same as the branch. (default: master)
369 :submodule-recursive: Whether to checkout submodules recursively.
372 :gerrit_verify_triggers: Override Gerrit Triggers.
373 :gerrit_trigger_file_paths: Override file paths which can be used to
374 filter which file modifications will trigger a build.
375 (default defined by lf_jjb_common)
378 .. _gjjb-packer-merge:
383 Packer Merge job runs `packer build` to build system images in the cloud.
386 - {project-name}-packer-merge-{platforms}-{templates}
387 - gerrit-packer-merge
388 - github-packer-merge
390 :Required parameters:
392 :build-node: The node to run build on.
393 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
394 be configured in defaults.yaml)
395 :mvn-settings: The name of settings file containing credentials for
397 :platforms: Platform or distribution to build. Typically json file
398 found in the packer/vars directory. (Example: centos)
399 :template: System template to build. Typically shell script found in
400 the packer/provision directory. (Example: java-builder)
402 :Optional parameters:
404 :branch: Git branch to fetch for the build. (default: master)
405 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
406 :build-timeout: Timeout in seconds before aborting build. (default: 10)
407 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
408 :packer-cloud-settings: Name of settings file containing credentials
409 for the cloud that packer will build on. (default: packer-cloud-env)
410 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
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.
419 .. _gjjb-packer-verify:
424 Packer Verify job runs `packer validate` to verify packer configuration.
427 - {project-name}-packer-verify
428 - gerrit-packer-verify
429 - github-packer-verify
431 :Required parameters:
433 :build-node: The node to run build on.
434 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
435 be configured in defaults.yaml)
436 :mvn-settings: The name of settings file containing credentials for
439 :Optional parameters:
441 :branch: Git branch to fetch for the build. (default: master)
442 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
443 :build-timeout: Timeout in seconds before aborting build. (default: 10)
444 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
445 :packer-cloud-settings: Name of settings file containing credentials
446 for the cloud that packer will build on. (default: packer-cloud-env)
447 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
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.
453 :gerrit_verify_triggers: Override Gerrit Triggers.
454 :gerrit_trigger_file_paths: Override file paths which can be used to
455 filter which file modifications will trigger a build.