8 .. include:: ../job-groups.rst
10 Below is a list of CI job groups:
12 .. literalinclude:: ../../jjb/lf-ci-job-groups.yaml
19 lf-infra-jjb-parameters
20 -----------------------
24 :jjb-cache: Location of Jenkins Job Builder (JJB) cache used for jjb
26 :jjb-version: Version of Jenkins Job Builder (JJB) to install and use in
32 Deploys Jenkins Cloud configuration read from the ``jenkins-clouds`` directory
33 in ci-management repositories.
37 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
38 config definitions for "production" and "sandbox" systems.
42 :jenkins-silos: Space-separated list of Jenkins silos to update
43 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
45 lf-jenkins-cfg-global-vars
46 --------------------------
48 Manages the Global Jenkins variables. This macro will clear all exist macros
49 in Jenkins and replaces them with the ones defined by the
50 ci-management/jenkins-config/global-vars-SILO.sh script.
54 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
55 config definitions for "production" and "sandbox" systems.
59 :jenkins-silos: Space-separated list of Jenkins silos to update
60 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
65 Provides jenkins_jobs.ini configuration for Jenkins.
70 Common packer configuration.
75 Gerrit file-paths for packer jobs.
80 Parameters useful for packer related tasks.
84 :packer-version: Version of packer to install / use.
85 (shell: PACKER_VERSION)
87 lf-packer-verify-file-paths
88 ---------------------------
90 Gerrit file-paths for packer verify jobs.
95 Parameters useful for Puppet related tasks.
99 :puppet-lint-version: Version of puppet-lint to install / use.
100 (shell: PUPPET_LINT_VERSION)
105 .. _gerrit-branch-lock:
110 Job submits a patch to lock or unlock a project's branch. This should only be
111 loaded once, as "ci-management-gerrit-branch-lock" (or "ci-management"
112 equivalent). That job will process lock/unlock requests for all projects and
116 - {project-name}-gerrit-branch-lock
124 :Required parameters:
126 :build-node: The node to run build on.
127 :jenkins-ssh-credential: Credential to use for SSH. (Generally
128 should be configured in defaults.yaml)
130 :Optional parameters:
132 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
133 :submodule-timeout: Timeout (in minutes) for checkout operation.
135 :gerrit_merge_triggers: Override Gerrit Triggers.
137 .. _lf-global-jjb-jenkins-cfg-merge:
139 Jenkins Configuration Merge
140 ---------------------------
142 Jenkins job to manage Global Jenkins configuration.
146 Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
147 config definitions for "production" and "sandbox" systems.
151 - {project-name}-jenkins-cfg-merge
152 - gerrit-jenkins-cfg-merge
153 - github-jenkins-cfg-merge
155 :Optional parameters:
157 :branch: Git branch to build against. (default: master)
158 :cron: How often to run the job on a cron schedule. (default: @daily)
159 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
160 :jenkins-silos: Space separated list of Jenkins silos to update
161 configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
162 (default: production sandbox)
164 Typically this template is automatically pulled in by the
165 "{project-name}-ci-jobs" job-group and does not need to be explicitly called if
166 the job group is being used.
170 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
175 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-full.yaml
178 .. _jenkins-cfg-envvar:
180 Global Environment Variables
181 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183 Global Environment Variables are managed via the
184 ``jenkins-config/global-vars-SILO.sh`` file in ci-management. Replace SILO with
185 the name of the Jenkins silo the variable configuration is for.
187 The format for this file is ``KEY=value`` for example::
189 GERRIT_URL=https://git.opendaylight.org/gerrit
190 GIT_BASE=git://devvexx.opendaylight.org/mirror/$PROJECT
191 GIT_URL=git://devvexx.opendaylight.org/mirror
192 JENKINS_HOSTNAME=vex-yul-odl-jenkins-2
193 LOGS_SERVER=https://logs.opendaylight.org
194 NEXUS_URL=https://nexus.opendaylight.org
195 ODLNEXUSPROXY=https://nexus.opendaylight.org
197 SONAR_URL=https://sonar.opendaylight.org
202 This configuration requires the OpenStack Cloud plugin in Jenkins and is
203 currently the only cloud plugin supported.
205 OpenStack Cloud plugin version supported:
210 Cloud configuration are managed via a directory structure in ci-management as
213 - jenkins-config/clouds/openstack/
214 - jenkins-config/clouds/openstack/cattle/cloud.cfg
215 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
216 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
217 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
219 The directory name inside of the "openstack" directory is used as the name of
220 the cloud configuration. In this case "cattle" is being used as the cloud name.
222 The ``cloud.cfg`` file is a special file used to configure the main cloud
223 configuration in the format ``KEY=value``.
227 :CLOUD_URL: API endpoint URL for Keystone.
229 :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
230 :CLOUD_ZONE: OpenStack region to use. (default: "")
231 :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
232 (default: "os-cloud")
233 :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
235 :SANDBOX_CAP: Total number of instances the cloud will allow to
236 spin up. This applies to "sandbox" systems and overrides the
237 INSTANCE_CAP setting. (default: null)
239 :Template Parameters:
243 In the case of template definitions of a parameter below is not passed
244 the one defined in default clouds will be inherited.
246 :IMAGE_NAME: The image name to use for this template.
248 :HARDWARE_ID: OpenStack flavor to use. (required)
250 :LABELS: Labels to assign to the vm. (default: FILE_NAME)
251 :NETWORK_ID: OpenStack network to use. (default: "")
252 :USER_DATA_ID: User Data to pass into the instance.
253 (default: jenkins-init-script)
254 :INSTANCE_CAP: Total number of instances of this type that can be launched
255 at one time. When defined in clouds.cfg it defines the total for the
256 entire cloud. (default: null)
257 :SANDBOX_CAP: Total number of instances of this type that can be launched
258 at one time. When defined in clouds.cfg it defines the total for the
259 entire cloud. This applies to "sandbox" systems and overrides the
260 INSTANCE_CAP setting. (default: null)
261 :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
262 :SECURITY_GROUPS: Security group to use. (default: "default")
263 :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
264 :START_TIMEOUT: Number of milliseconds to wait for the agent to be
265 provisioned and connected. (default: 600000)
266 :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
268 :NUM_EXECUTORS: Number of executors to enable for the instance.
270 :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
271 :FS_ROOT: File system root for the workspace. (default: "/w")
272 :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
273 again before it's removed. If set to -1, the slave will be kept
274 forever. (default: 0)
275 :CONNECTION_TYPE: The connection type for Jenkins to connect to the build
276 minion. Valid options: JNLP, SSH. (default: "SSH")
278 For a live example see the OpenDaylight project jenkins-config directory.
279 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
284 :Cloud Configuration:
286 The directory ``groovy-inserts`` contains the groovy script output that is
287 used to push to Jenkins. In the event of a job failure this file can be
290 .. _lf-global-jjb-jenkins-cfg-verify:
292 Jenkins Configuration Verify
293 ----------------------------
295 Jenkins job to verify the Global Jenkins configuration.
297 Requires the ``clouds-yaml`` file to be setup on the Jenkins host.
301 - {project-name}-jenkins-cfg-verify
302 - gerrit-jenkins-cfg-verify
303 - github-jenkins-cfg-verify
305 :Optional parameters:
307 :branch: Git branch to build against. (default: master)
308 :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
310 This job is not part of the "{project-name}-ci-jobs" group. It must be called
315 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-verify.yaml
319 .. _jenkins-sandbox-cleanup:
321 Jenkins Sandbox Cleanup
322 -----------------------
324 Cleanup Jenkins Sandbox of jobs and views periodically.
328 - {project-name}-jenkins-sandbox-cleanup
329 - gerrit-jenkins-sandbox-cleanup
330 - github-jenkins-sandbox-cleanup
332 :Comment Trigger: NONE
334 :Required parameters:
336 :build-node: The node to run build on.
337 :jenkins-ssh-credential: Credential to use for SSH. (Generally
338 should be configured in defaults.yaml)
340 :Optional parameters:
342 :cron: Schedule to run job. (default: '0 8 * * 6')
350 Deploy jobs to jenkins-sandbox system via code review comment.
352 This job checks out the current code review patch and then runs a
353 ``jenkins-jobs update`` to push a patch defined by the comment.
357 - {project-name}-jjb-deploy-job
358 - gerrit-jjb-deploy-job
359 - github-jjb-deploy-job
361 :Comment Trigger: jjb-deploy JOB_NAME
365 The JJB Deploy Job is configured to trigger only if the Gerrit comment
366 starts with the `jjb-deploy` keyword.
368 Example of a valid command in Gerrit comment that triggers the job:
370 ``jjb-deploy builder-jjb-*``
372 Example of a invalid command in Gerrit comment that would _not_ trigger
375 ``Update the job. jjb-deploy builder-jjb-*``
377 JOB_NAME can include the * wildcard character to push multiple jobs
378 matching the pattern. For example ``jjb-deploy builder-jjb-*`` will push
379 all builder-jjb-* jobs to the sandbox system.
381 :Required parameters:
383 :build-node: The node to run build on.
384 :jenkins-ssh-credential: Credential to use for SSH. (Generally
385 should be configured in defaults.yaml)
387 :Optional parameters:
389 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
390 :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
398 Runs `jenkins-jobs update` to update production job configuration
401 - {project-name}-jjb-merge
405 :Comment Trigger: remerge
407 :Required parameters:
409 :build-node: The node to run build on.
410 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
411 be configured in defaults.yaml)
413 :Optional parameters:
415 :branch: Git branch to fetch for the build. (default: master)
416 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
417 :build-timeout: Timeout in minutes before aborting build. (default: 10)
418 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
419 :jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
420 :jjb-workers: Number of threads to run **update** with. Set to 0 by default
421 which is equivalent to the number of available CPU cores. (default: 0)
422 :jjb-version: JJB version to install. (default: see job-template)
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 :submodule-timeout: Timeout (in minutes) for checkout operation.
429 :submodule-disable: Disable submodule checkout operation.
432 :gerrit_merge_triggers: Override Gerrit Triggers.
433 :gerrit_trigger_file_paths: Override file paths which can be used to
434 filter which file modifications will trigger a build.
435 (default defined by lf_jjb_common)
443 Runs `jenkins-jobs test` to validate JJB syntax
446 - {project-name}-jjb-verify
450 :Comment Trigger: recheck|reverify
452 :Required parameters:
454 :build-node: The node to run build on.
455 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
456 be configured in defaults.yaml)
458 :Optional parameters:
460 :branch: Git branch to fetch for the build. (default: master)
461 :build-concurrent: Whether or not to allow this job to run multiple jobs
462 simultaneously. (default: true)
463 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
464 :build-timeout: Timeout in minutes before aborting build. (default: 10)
465 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
466 :jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
467 :jjb-version: JJB version to install. (default: see job-template)
468 :stream: Keyword that can be used to represent a release code-name.
469 Often the same as the branch. (default: master)
470 :submodule-recursive: Whether to checkout submodules recursively.
472 :submodule-timeout: Timeout (in minutes) for checkout operation.
474 :submodule-disable: Disable submodule checkout operation.
476 :throttle_categories: List of categories to throttle by.
477 :throttle-enabled: Whether or not to enable throttling on the job.
479 :throttle-max-per-node: Max jobs to run on the same node. (default: 1)
480 :throttle-max-total: Max jobs to run across the entire project. - 0
481 means 'unlimited' (default: 0)
482 :throttle-option: Throttle by the project or by list of categories
483 defined in the throttle plugin configuration. (options: 'project',
484 'category'; default: project)
486 :gerrit_verify_triggers: Override Gerrit Triggers.
487 :gerrit_trigger_file_paths: Override file paths which can be used to
488 filter which file modifications will trigger a build.
489 (default defined by lf_jjb_common)
491 .. _jjb-verify-upstream-gjjb:
493 JJB Verify Upstream Global JJB
494 ------------------------------
496 Runs ``jenkins-jobs test`` to validate JJB syntax for upstream global-jjb
497 patches. This job is useful to notify upstream that they may be breaking
501 - {project-name}-jjb-verify-upstream-gjjb
502 - gerrit-jjb-verify-upstream-gjjb
504 :Comment Trigger: recheck|reverify
506 :Required parameters:
508 :build-node: The node to run build on.
509 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
510 be configured in defaults.yaml)
512 :Optional parameters:
514 :branch: Git branch to fetch for the build. (default: master)
515 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
516 :build-timeout: Timeout in minutes before aborting build. (default: 10)
517 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
518 :jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
519 :jjb-version: JJB version to install. (default: see job-template)
520 :stream: Keyword that can be used to represent a release code-name.
521 Often the same as the branch. (default: master)
523 .. _info-yaml-verify:
528 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
529 other file changes. Verifies INFO.yaml files follow the schema defined in
530 `lfit/releng-global-jjb/schema/info-schema.yaml`.
533 - {project-name}-info-yaml-verify
534 - gerrit-info-yaml-verify
535 - github-info-yaml-verify
537 :Required parameters:
539 :build-node: The node to run build on.
540 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
541 be configured in defaults.yaml)
543 :Optional parameters:
545 :branch: Git branch to fetch for the build. (default: master)
546 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
547 :build-timeout: Timeout in minutes before aborting build. (default: 10)
548 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
549 :stream: Keyword that can be used to represent a release code-name.
550 Often the same as the branch. (default: master)
551 :submodule-recursive: Whether to checkout submodules recursively.
553 :submodule-timeout: Timeout (in minutes) for checkout operation.
555 :submodule-disable: Disable submodule checkout operation.
558 :gerrit_verify_triggers: Override Gerrit Triggers.
565 Job to scan projects for files missing license headers.
568 - {project-name}-license-check
569 - gerrit-license-check
570 - github-license-check
572 :Optional parameters:
574 :build-timeout: Timeout in minutes before aborting build. (default: 15)
575 :file-patterns: Space-separated list of file patterns to scan.
576 (default: \*.go \*.groovy \*.java \*.py \*.sh)
577 :spdx-disable: Disable the SPDX-Identifier checker. (default: false)
578 :lhc-version: Version of LHC to use. (default: 0.2.0)
579 :license-exclude-paths: Comma-separated list of paths to exclude from the
580 license checker. The paths used here will be matched using a contains
581 rule so it is best to be as precise with the path as possible.
582 For example a path of '/src/generated/' will be searched as
583 '**/src/generated/**'.
584 Example: org/opendaylight/yang/gen,protobuff/messages
586 :licenses-allowed: Comma-separated list of allowed licenses.
587 (default: Apache-2.0,EPL-1.0,MIT)
588 :project-pattern: The ANT based pattern for Gerrit Trigger to choose which
589 projects to trigger job against. (default: '**')
591 .. _gjjb-openstack-cron:
596 Cron job that runs regularly to perform periodic tasks against OpenStack.
598 This job requires a Config File Provider file named ``clouds-yaml`` available
599 containing the credentials for the cloud.
602 - {project-name}-openstack-cron
603 - gerrit-openstack-cron
604 - github-openstack-cron
606 :Required parameters:
608 :build-node: The node to run build on.
609 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
610 be configured in defaults.yaml)
611 :jenkins-urls: URLs to Jenkins systems to check for active builds.
613 :Optional parameters:
615 :branch: Git branch to fetch for the build. (default: master)
616 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
617 :build-timeout: Timeout in minutes before aborting build. (default: 90)
618 :cron: Time when the packer image should be rebuilt (default: @hourly)
619 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
620 :openstack-cloud: OS_CLOUD setting to pass to openstack client.
622 :openstack-image-cleanup: Whether or not to run the image cleanup script.
624 :openstack-image-cleanup-age: Age in days of image before marking it for
625 removal. (default: 30)
626 :openstack-image-protect: Whether or not to run the image protect script.
628 :openstack-server-cleanup: Whether or not to run the server cleanup script.
630 :openstack-stack-cleanup: Whether or not to run the stack cleanup script.
632 :openstack-volume-cleanup: Whether or not to run the volume cleanup script.
634 :stream: Keyword that can be used to represent a release code-name.
635 Often the same as the branch. (default: master)
636 :submodule-recursive: Whether to checkout submodules recursively.
638 :submodule-timeout: Timeout (in minutes) for checkout operation.
640 :submodule-disable: Disable submodule checkout operation.
645 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/openstack-cron-minimal.yaml
649 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/openstack-cron-full.yaml
651 .. _gjjb-openstack-update-cloud-image:
653 OpenStack Update Cloud Image
654 ----------------------------
656 This job finds and updates OpenStack cloud images on the ci-management source
659 The job is triggered in two ways:
661 1. When packer merge job completes, the new image name created is passed
663 2. When the job is triggered manually to update all new images.
665 When the job is triggered through an upstream packer merge job, this only
666 generates a change request for the new image built.
668 When the job is triggered manually, this job finds the latest images on
669 OpenStack cloud and compares them with the images currently used in the source
670 ci-management source repository. If the compared images have newer
671 time stamps are **all** updated through a change request.
673 This job requires a Jenkins configuration merge and verify job setup and
677 - {project-name}-openstack-update-cloud-image
678 - gerrit-openstack-update-cloud-image
679 - github-openstack-update-cloud-image
681 :Required parameters:
683 :build-node: The node to run build on.
684 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
685 be configured in defaults.yaml)
686 :new-image-name: Name of new image name passed from packer merge job or
687 set to 'all' to update all images. (default: all)
689 :Optional parameters:
691 :branch: Git branch to fetch for the build. (default: master)
692 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
693 :build-timeout: Timeout in minutes before aborting build. (default: 90)
694 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
695 :openstack-cloud: OS_CLOUD setting to pass to openstack client.
697 :stream: Keyword that can be used to represent a release code-name.
698 Often the same as the branch. (default: master)
699 :submodule-recursive: Whether to checkout submodules recursively.
701 :submodule-timeout: Timeout (in minutes) for checkout operation.
703 :submodule-disable: Disable submodule checkout operation.
705 :update-cloud-image: Submit a change request to update new built cloud
706 image to Jenkins. (default: false)
710 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/openstack-update-cloud-image-minimal.yaml
714 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/openstack-update-cloud-image-full.yaml
717 .. _gjjb-packer-merge:
722 Packer Merge job runs `packer build` to build system images in the cloud.
725 - {project-name}-packer-merge-{platforms}-{templates}
726 - gerrit-packer-merge
727 - github-packer-merge
729 :Comment Trigger: remerge
731 :Required parameters:
733 :build-node: The node to run build on.
734 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
735 be configured in defaults.yaml)
736 :mvn-settings: The name of settings file containing credentials for
738 :platforms: Platform or distribution to build. Typically json file
739 found in the packer/vars directory. (Example: centos)
740 :template: System template to build. Typically shell script found in
741 the packer/provision directory. (Example: java-builder)
743 :Optional parameters:
745 :cron: Time when the packer image should be rebuilt (default: @monthly)
746 :branch: Git branch to fetch for the build. (default: master)
747 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
748 :build-timeout: Timeout in minutes before aborting build. (default: 90)
749 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
750 :openstack: Packer template uses an OpenStack builder (default: true).
751 :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
753 :packer-cloud-settings: Name of settings file containing credentials
754 for the cloud that packer will build on. (default: packer-cloud-env)
755 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
756 :stream: Keyword that can be used to represent a release code-name.
757 Often the same as the branch. (default: master)
758 :submodule-recursive: Whether to checkout submodules recursively.
760 :submodule-timeout: Timeout (in minutes) for checkout operation.
762 :submodule-disable: Disable submodule checkout operation.
765 :gerrit_verify_triggers: Override Gerrit Triggers.
766 :update-cloud-image: Submit a change request to update new built cloud
767 image to Jenkins. (default: false)
770 Test an in-progress patch
771 ^^^^^^^^^^^^^^^^^^^^^^^^^
773 To test an in-progress patch from a GitHub Pull Request. Upload this
774 job to the :doc:`Jenkins Sandbox <lfdocs:jenkins-sandbox>`. Then when manually
775 building the job replace the GERRIT_REFSPEC parameter with the GitHub Pull
776 Request number of the patch you would like to test.
782 GERRIT_REFSPEC: origin/pr/49/merge
784 .. _gjjb-packer-verify:
789 Packer Verify job runs `packer validate` to verify packer configuration.
792 - {project-name}-packer-verify
793 - gerrit-packer-verify
794 - github-packer-verify
796 :Comment Trigger: recheck|reverify
798 :Required parameters:
800 :build-node: The node to run build on.
801 :jenkins-ssh-credential: Credential to use for SSH. (Generally should
802 be configured in defaults.yaml)
803 :mvn-settings: The name of settings file containing credentials for
806 :Optional parameters:
808 :branch: Git branch to fetch for the build. (default: master)
809 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
810 :build-timeout: Timeout in minutes before aborting build. (default: 10)
811 :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
812 :openstack: Packer template uses an OpenStack builder (default: true).
813 :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
815 :packer-cloud-settings: Name of settings file containing credentials
816 for the cloud that packer will build on. (default: packer-cloud-env)
817 :packer-version: Version of packer to install / use in build. (default: 1.0.2)
818 :stream: Keyword that can be used to represent a release code-name.
819 Often the same as the branch. (default: master)
820 :submodule-recursive: Whether to checkout submodules recursively.
822 :submodule-timeout: Timeout (in minutes) for checkout operation.
824 :submodule-disable: Disable submodule checkout operation.
827 :gerrit_verify_triggers: Override Gerrit Triggers.
828 :gerrit_trigger_file_paths: Override file paths which can be used to
829 filter which file modifications will trigger a build.
835 Runs puppet-lint in the ``puppet-dir`` directory. puppet-lint runs recursively,
836 the base directory is usually the best place to run from.
840 - {project-name}-puppet-verify
841 - gerrit-puppet-verify
842 - github-puppet-verify
844 :Comment Trigger: recheck|reverify
846 :Required Parameters:
848 :build-node: The node to run build on.
849 :jenkins-ssh-credential: Credential to use for SSH. (Generally set
852 :Optional Parameters:
854 :branch: The branch to build against. (default: master)
855 :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
856 :build-timeout: Timeout in minutes before aborting build. (default: 15)
857 :gerrit_trigger_file_paths: Override file paths which used to filter which
858 file modifications will trigger a build. Refer to JJB documentation for
860 https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gerrit
861 :git-url: URL clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
862 :puppet-dir: Directory containing the project's puppet module(s) relative
865 :puppet-lint-version: Version of puppet-lint to use for testing.
867 :stream: Keyword representing a release code-name.
868 Often the same as the branch. (default: master)
869 :submodule-recursive: Whether to checkout submodules recursively.
871 :submodule-timeout: Timeout (in minutes) for checkout operation.
873 :submodule-disable: Disable submodule checkout operation.
880 Runs Jenkins Sonarqube plug-in to review for bugs, code smells,
881 and security vulnerabilities.
883 Requires ``SonarQube Scanner for Jenkins``
885 Plug-in configurations
886 Manage Jenkins --> Configure System --> SonarQube servers
887 - Name: Sonar (fixed)
888 - Server URL: https://sonar.server.org/ or https://sonarcloud.io
889 - Server authentication token: none for local, API token (saved as a
890 "secret text" credential) for Sonarcloud
892 Manage Jenkins --> Global Tool Configuration --> SonarQube Scanner
893 - Name: SonarQube Scanner (fixed)
894 - Install automatically
895 - Select latest version
897 .. note:: Sonar properties can be set directly in the job definition by
898 setting the sonar-project-file to ``""`` and adding all properties under
899 ``sonar-properties``.
903 - {project-name}-sonar
907 :Optional Parameters:
908 :sonar-task: Sonar task to run. (default: "")
909 :sonar-project-file: The filename for the project's properties
910 (default: "sonar-project.properties")
911 :sonar-properties: Sonar configuration properties. (default: "")
912 :sonar-java-opts: JVM options. (default: "")
913 :sonar-additional-args: Additional command line arguments. (default: "")
919 The same as the Sonar job above, except the caller also defines a builder
920 called ``lf-sonar-prescan``, in which they can put any builders that they want
921 to run prior to the Sonar scan.
926 name: lf-sonar-prescan
928 - shell: "# Pre-scan shell script"
932 - {project-name}-sonar-prescan
933 - gerrit-sonar-prescan
934 - github-sonar-prescan
936 :Required Parameters:
937 :lf-sonar-prescan: A builder that will run prior to the Sonar scan.
939 :Optional Parameters:
940 :sonar-task: Sonar task to run. (default: "")
941 :sonar-project-file: The filename for the project's properties
942 (default: "sonar-project.properties")
943 :sonar-properties: Sonar configuration properties. (default: "")
944 :sonar-java-opts: JVM options. (default: "")
945 :sonar-additional-args: Additional command line arguments. (default: "")