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
84 lf-packer-verify-file-paths
85 ---------------------------
87 Gerrit file-paths for packer verify jobs.
92 Gerrit file-paths for packer jobs.
97 Common packer configuration.
105 Job submits a patch to lock or unlock a project's branch.
108 - {project-name}-gerrit-branch-lock-{stream}
112 .. _lf-global-jjb-jenkins-cfg-merge:
114 Jenkins Configuration Merge
115 ---------------------------
117 Jenkins job to manage Global Jenkins configuration.
121 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
122 config definitions for "production" and "sandbox" systems.
126 - {project-name}-jenkins-cfg-merge
127 - gerrit-jenkins-cfg-merge
128 - github-jenkins-cfg-merge
130 :Optional parameters:
132 :branch: Git branch to build against. (default: master)
133 :cron: How often to run the job on a cron schedule. (default: @daily)
134 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
135 :jenkins-silos: Space separated list of Jenkins silos to update
136 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
137 (default: production sandbox)
139 Typically this template is automatically pulled in by the
140 "{project-name}-ci-jobs" job-group and does not need to be explicitly called if
141 the job group is being used.
145 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
150 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-full.yaml
153 Global Environment Variables
154 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156 Global Environment Variables are managed via the
157 ``jenkins-config/global-vars-SILO.sh`` file in ci-management. Replace SILO with
158 the name of the Jenkins silo the variable configuration is for.
160 The format for this file is ``KEY=value`` for example::
162 GERRIT_URL=https://git.opendaylight.org/gerrit
163 GIT_BASE=git://devvexx.opendaylight.org/mirror/$PROJECT
164 GIT_URL=git://devvexx.opendaylight.org/mirror
165 JENKINS_HOSTNAME=vex-yul-odl-jenkins-2
166 LOGS_SERVER=https://logs.opendaylight.org
167 NEXUS_URL=https://nexus.opendaylight.org
168 ODLNEXUSPROXY=https://nexus.opendaylight.org
170 SONAR_URL=https://sonar.opendaylight.org
175 This configuration requires the OpenStack Cloud plugin in Jenkins and is
176 currently the only cloud plugin supported.
178 OpenStack Cloud plugin version supported:
183 Cloud configuration are managed via a directory structure in ci-management as
186 - jenkins-config/clouds/openstack/
187 - jenkins-config/clouds/openstack/cattle/cloud.cfg
188 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
189 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
190 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
192 The directory name inside of the "openstack" directory is used as the name of
193 the cloud configuration. In this case "cattle" is being used as the cloud name.
195 The ``cloud.cfg`` file is a special file used to configure the main cloud
196 configuration in the format ``KEY=value``.
200 :CLOUD_URL: API endpoint URL for Keystone.
202 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
203 :CLOUD_ZONE: OpenStack region to use. (default: "")
204 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
205 (default: "os-cloud")
206 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
208 :SANDBOX_CAP: Total number of instances the clodu will allow to
209 spin up. This applies to "sandbox" systems and overrides the
210 INSTANCE_CAP setting. (default: null)
212 :Template Parameters:
216 In the case of template definitions of a parameter below is not passed
217 the one defined in default clouds will be inherited.
219 :IMAGE_NAME: The image name to use for this template.
221 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
222 :HARDWARE_ID: OpenStack flavor to use. (default: "")
223 :NETWORK_ID: OpenStack network to use. (default: "")
224 :USER_DATA_ID: User Data to pass into the instance.
225 (default: jenkins-init-script)
226 :INSTANCE_CAP: Total number of instances of this type that can be launched
227 at one time. When defined in clouds.cfg it defines the total for the
228 entire cloud. (default: null)
229 :SANDBOX_CAP: Total number of instances of this type that can be launched
230 at one time. When defined in clouds.cfg it defines the total for the
231 entire cloud. This applies to "sandbox" systems and overrides the
232 INSTANCE_CAP setting. (default: null)
233 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
234 :SECURITY_GROUPS: Security group to use. (default: "default")
235 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
236 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
237 provisioned and connected. (default: 600000)
238 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
240 :NUM_EXECUTORS: Number of executors to enable for the instance.
242 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
243 :FS_ROOT: File system root for the workspace. (default: "/w")
244 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
245 again before it's removed. If set to -1, the slave will be kept
246 forever. (default: 0)
248 For a live example see the OpenDaylight project jenkins-config directory.
249 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
254 :Cloud Configuration:
256 The directory ``groovy-inserts`` contains the groovy script output that is
257 used to push to Jenkins. In the event of a job failure this file can be
264 Deploy jobs to jenkins-sandbox system via code review comment
266 This job checks out the current code review patch and then runs a
267 `jenkins-jobs update` to push a patch defined by the comment.
271 - {project-name}-jjb-deploy-job
272 - gerrit-jjb-deploy-job
273 - github-jjb-deploy-job
275 :Comment Trigger: jjb-deploy JOB_NAME
279 JOB_NAME can include the * wildcard character to push multiple jobs
280 matching the pattern. For example `jjb-deploy builder-jjb-*`` will push
281 all builder-jjb-* jobs to the sandbox system.
283 :Required parameters:
285 :build-node: The node to run build on.
286 :jenkins-ssh-credential: Credential to use for SSH. (Generally
287 should be configured in defaults.yaml)
289 :Optional parameters:
291 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
292 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
298 Runs `jenkins-jobs update` to update production job configuration
301 - {project-name}-jjb-merge
305 :Required parameters:
307 :build-node: The node to run build on.
308 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
309 be configured in defaults.yaml)
310 :mvn-settings: The name of settings file containing credentials for
313 :Optional parameters:
315 :branch: Git branch to fetch for the build. (default: master)
316 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
317 :build-timeout: Timeout in seconds before aborting build. (default: 10)
318 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
319 :stream: Keyword that can be used to represent a release code-name.
320 Often the same as the branch. (default: master)
321 :submodule-recursive: Whether to checkout submodules recursively.
324 :gerrit_merge_triggers: Override Gerrit Triggers.
325 :gerrit_trigger_file_paths: Override file paths which can be used to
326 filter which file modifications will trigger a build.
327 (default defined by lf_jjb_common)
333 Runs `jenkins-jobs test` to validate JJB syntax
336 - {project-name}-jjb-verify
340 :Required parameters:
342 :build-node: The node to run build on.
343 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
344 be configured in defaults.yaml)
345 :mvn-settings: The name of settings file containing credentials for
348 :Optional parameters:
350 :branch: Git branch to fetch for the build. (default: master)
351 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
352 :build-timeout: Timeout in seconds before aborting build. (default: 10)
353 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
354 :stream: Keyword that can be used to represent a release code-name.
355 Often the same as the branch. (default: master)
356 :submodule-recursive: Whether to checkout submodules recursively.
359 :gerrit_verify_triggers: Override Gerrit Triggers.
360 :gerrit_trigger_file_paths: Override file paths which can be used to
361 filter which file modifications will trigger a build.
362 (default defined by lf_jjb_common)
365 .. _gjjb-packer-merge:
370 Packer Merge job runs `packer build` to build system images in the cloud.
373 - {project-name}-packer-merge-{platforms}-{templates}
374 - gerrit-packer-merge
375 - github-packer-merge
377 :Required parameters:
379 :build-node: The node to run build on.
380 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
381 be configured in defaults.yaml)
382 :mvn-settings: The name of settings file containing credentials for
384 :platforms: Platform or distribution to build. Typically json file
385 found in the packer/vars directory. (Example: centos)
386 :template: System template to build. Typically shell script found in
387 the packer/provision directory. (Example: java-builder)
389 :Optional parameters:
391 :branch: Git branch to fetch for the build. (default: master)
392 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
393 :build-timeout: Timeout in seconds before aborting build. (default: 10)
394 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
395 :packer-cloud-settings: Name of settings file containing credentials
396 for the cloud that packer will build on. (default: packer-cloud-env)
397 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
398 :stream: Keyword that can be used to represent a release code-name.
399 Often the same as the branch. (default: master)
400 :submodule-recursive: Whether to checkout submodules recursively.
403 :gerrit_verify_triggers: Override Gerrit Triggers.
406 .. _gjjb-packer-verify:
411 Packer Verify job runs `packer validate` to verify packer configuration.
414 - {project-name}-packer-verify
415 - gerrit-packer-verify
416 - github-packer-verify
418 :Required parameters:
420 :build-node: The node to run build on.
421 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
422 be configured in defaults.yaml)
423 :mvn-settings: The name of settings file containing credentials for
426 :Optional parameters:
428 :branch: Git branch to fetch for the build. (default: master)
429 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
430 :build-timeout: Timeout in seconds before aborting build. (default: 10)
431 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
432 :packer-cloud-settings: Name of settings file containing credentials
433 for the cloud that packer will build on. (default: packer-cloud-env)
434 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
435 :stream: Keyword that can be used to represent a release code-name.
436 Often the same as the branch. (default: master)
437 :submodule-recursive: Whether to checkout submodules recursively.
440 :gerrit_verify_triggers: Override Gerrit Triggers.
441 :gerrit_trigger_file_paths: Override file paths which can be used to
442 filter which file modifications will trigger a build.