Update lf-info-yaml-verify
[releng/global-jjb.git] / docs / jjb / lf-ci-jobs.rst
1 #######
2 CI Jobs
3 #######
4
5 Job Groups
6 ==========
7
8 .. include:: ../job-groups.rst
9
10 Below is a list of CI job groups:
11
12 .. literalinclude:: ../../jjb/lf-ci-job-groups.yaml
13    :language: yaml
14
15
16 Macros
17 ======
18
19 lf-infra-jjb-parameters
20 -----------------------
21
22 :Required Parameters:
23
24     :jjb-cache: Location of Jenkins Job Builder (JJB) cache used for jjb
25         jobs.
26     :jjb-version: Version of Jenkins Job Builder (JJB) to install and use in
27         the jjb jobs.
28
29 lf-jenkins-cfg-clouds
30 ---------------------
31
32 Deploys Jenkins Cloud configuration read from the ``jenkins-clouds`` directory
33 in ci-management repositories.
34
35 .. note::
36
37    Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
38    config definitions for "production" and "sandbox" systems.
39
40 :Required Parameters:
41
42     :jenkins-silos: Space-separated list of Jenkins silos to update
43         configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
44
45 lf-jenkins-cfg-global-vars
46 --------------------------
47
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.
51
52 .. note::
53
54    Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
55    config definitions for "production" and "sandbox" systems.
56
57 :Required parameters:
58
59     :jenkins-silos: Space-separated list of Jenkins silos to update
60         configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
61
62 lf-infra-jjbini
63 ---------------
64
65 Provides jenkins_jobs.ini configuration for Jenkins.
66
67 lf-infra-jjbini-sandbox
68 -----------------------
69
70 Provides jenkins_jobs.ini configuration for Jenkins sandbox.
71
72 .. todo:: This needs to be consolidated into lf-infra-jjbini when JJB 2.0 is available
73
74 lf-packer-common
75 ----------------
76
77 Common packer configuration.
78
79 lf-packer-file-paths
80 --------------------
81
82 Gerrit file-paths for packer jobs.
83
84 lf-packer-parameters
85 --------------------
86
87 Parameters useful for packer related tasks.
88
89 :Parameters:
90
91     :packer-version: Version of packer to install / use.
92         (shell: PACKER_VERSION)
93
94 lf-packer-verify-file-paths
95 ---------------------------
96
97 Gerrit file-paths for packer verify jobs.
98
99 lf-puppet-parameters
100 --------------------
101
102 Parameters useful for Puppet related tasks.
103
104 :Parameters:
105
106     :puppet-lint-version: Version of puppet-lint to install / use.
107         (shell: PUPPET_LINT_VERSION)
108
109 Job Templates
110 =============
111
112 .. _gerrit-branch-lock:
113
114 Gerrit Branch Lock
115 ------------------
116
117 Job submits a patch to lock or unlock a project's branch.
118
119 :Template Names:
120     - {project-name}-gerrit-branch-lock-{stream}
121     - gerrit-branch-lock
122
123 :Comment Trigger:
124
125     * lock branch
126     * unlock branch
127
128 :Required parameters:
129
130     :build-node: The node to run build on.
131     :jenkins-ssh-credential: Credential to use for SSH. (Generally
132         should be configured in defaults.yaml)
133
134 :Optional parameters:
135
136     :branch: Git branch to build against. (default: master)
137     :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
138     :stream: Keyword that can be used to represent a release code-name.
139         Often the same as the branch. (default: master)
140     :submodule-timeout: Timeout (in minutes) for checkout operation.
141         (default: 10)
142     :submodule-disable: Disable submodule checkout operation.
143         (default: false)
144     :gerrit_merge_triggers: Override Gerrit Triggers.
145
146 .. _lf-global-jjb-jenkins-cfg-merge:
147
148 Jenkins Configuration Merge
149 ---------------------------
150
151 Jenkins job to manage Global Jenkins configuration.
152
153 .. note::
154
155    Requires the jjbini file in Jenkins CFP to contain JJB 2.0 style
156    config definitions for "production" and "sandbox" systems.
157
158 :Template names:
159
160     - {project-name}-jenkins-cfg-merge
161     - gerrit-jenkins-cfg-merge
162     - github-jenkins-cfg-merge
163
164 :Optional parameters:
165
166     :branch: Git branch to build against. (default: master)
167     :cron: How often to run the job on a cron schedule. (default: @daily)
168     :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
169     :jenkins-silos: Space separated list of Jenkins silos to update
170         configuration for as defined in ~/.config/jenkins_jobs/jenkins_jobs.ini
171         (default: production sandbox)
172
173 Typically this template is automatically pulled in by the
174 "{project-name}-ci-jobs" job-group and does not need to be explicitly called if
175 the job group is being used.
176
177 Minimal Example:
178
179 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
180    :language: yaml
181
182 Full Example:
183
184 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-full.yaml
185    :language: yaml
186
187 .. _jenkins-cfg-envvar:
188
189 Global Environment Variables
190 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191
192 Global Environment Variables are managed via the
193 ``jenkins-config/global-vars-SILO.sh`` file in ci-management. Replace SILO with
194 the name of the Jenkins silo the variable configuration is for.
195
196 The format for this file is ``KEY=value`` for example::
197
198     GERRIT_URL=https://git.opendaylight.org/gerrit
199     GIT_BASE=git://devvexx.opendaylight.org/mirror/$PROJECT
200     GIT_URL=git://devvexx.opendaylight.org/mirror
201     JENKINS_HOSTNAME=vex-yul-odl-jenkins-2
202     LOGS_SERVER=https://logs.opendaylight.org
203     NEXUS_URL=https://nexus.opendaylight.org
204     ODLNEXUSPROXY=https://nexus.opendaylight.org
205     SILO=sandbox
206     SONAR_URL=https://sonar.opendaylight.org
207
208 Cloud Configuration
209 ^^^^^^^^^^^^^^^^^^^
210
211 This configuration requires the OpenStack Cloud plugin in Jenkins and is
212 currently the only cloud plugin supported.
213
214 OpenStack Cloud plugin version supported:
215
216 * 2.30 - 2.34
217 * 2.35 - 2.37
218
219 Cloud configuration are managed via a directory structure in ci-management as
220 follows:
221
222 - jenkins-config/clouds/openstack/
223 - jenkins-config/clouds/openstack/cattle/cloud.cfg
224 - jenkins-config/clouds/openstack/cattle/centos7-builder-2c-2g.cfg
225 - jenkins-config/clouds/openstack/cattle/centos7-builder-4c-4g.cfg
226 - jenkins-config/clouds/openstack/cattle/centos7-docker-4c-4g.cfg
227
228 The directory name inside of the "openstack" directory is used as the name of
229 the cloud configuration. In this case "cattle" is being used as the cloud name.
230
231 The ``cloud.cfg`` file is a special file used to configure the main cloud
232 configuration in the format ``KEY=value``.
233
234 :Cloud Parameters:
235
236     :CLOUD_URL: API endpoint URL for Keystone.
237         (default: "")
238     :CLOUD_IGNORE_SSL: Ignore unverified SSL certificates. (default: false)
239     :CLOUD_ZONE: OpenStack region to use. (default: "")
240     :CLOUD_CREDENTIAL_ID: Credential to use for authentication to OpenStack.
241         (default: "os-cloud")
242     :INSTANCE_CAP: Total number of instances the cloud will allow spin up.
243         (default: null)
244     :SANDBOX_CAP: Total number of instances the cloud will allow to
245         spin up. This applies to "sandbox" systems and overrides the
246         INSTANCE_CAP setting. (default: null)
247
248 :Template Parameters:
249
250     .. note::
251
252        In the case of template definitions of a parameter below is not passed
253        the one defined in default clouds will be inherited.
254
255     :IMAGE_NAME: The image name to use for this template.
256         (required)
257     :HARDWARE_ID: OpenStack flavor to use. (required)
258
259     :LABELS: Labels to assign to the vm. (default: FILE_NAME)
260     :NETWORK_ID: OpenStack network to use. (default: "")
261     :USER_DATA_ID: User Data to pass into the instance.
262         (default: jenkins-init-script)
263     :INSTANCE_CAP: Total number of instances of this type that can be launched
264         at one time. When defined in clouds.cfg it defines the total for the
265         entire cloud. (default: null)
266     :SANDBOX_CAP: Total number of instances of this type that can be launched
267         at one time. When defined in clouds.cfg it defines the total for the
268         entire cloud. This applies to "sandbox" systems and overrides the
269         INSTANCE_CAP setting. (default: null)
270     :FLOATING_IP_POOL: Floating ip pool to use. (default: "")
271     :SECURITY_GROUPS: Security group to use. (default: "default")
272     :AVAILABILITY_ZONE: OpenStack availability zone to use. (default: "")
273     :START_TIMEOUT: Number of milliseconds to wait for the agent to be
274         provisioned and connected. (default: 600000)
275     :KEY_PAIR_NAME: SSH Public Key Pair to use for authentication.
276         (default: jenkins)
277     :NUM_EXECUTORS: Number of executors to enable for the instance.
278         (default: 1)
279     :JVM_OPTIONS: JVM Options to pass to Java. (default: "")
280     :FS_ROOT: File system root for the workspace. (default: "/w")
281     :RETENTION_TIME: Number of minutes to wait for an idle slave to be used
282         again before it's removed. If set to -1, the slave will be kept
283         forever. (default: 0)
284     :CONNECTION_TYPE: The connection type for Jenkins to connect to the build
285         minion. Valid options: JNLP, SSH. (default: "SSH")
286
287 For a live example see the OpenDaylight project jenkins-config directory.
288 https://github.com/opendaylight/releng-builder/tree/master/jenkins-config
289
290 Troubleshooting
291 ^^^^^^^^^^^^^^^
292
293 :Cloud Configuration:
294
295     The directory ``groovy-inserts`` contains the groovy script output that is
296     used to push to Jenkins. In the event of a job failure this file can be
297     inspected.
298
299  .. _lf-global-jjb-jenkins-cfg-verify:
300
301 Jenkins Configuration Verify
302 ----------------------------
303
304 Jenkins job to verify the Global Jenkins configuration.
305
306 Requires the ``clouds-yaml`` file to be setup on the Jenkins host.
307
308 :Template names:
309
310     - {project-name}-jenkins-cfg-verify
311     - gerrit-jenkins-cfg-verify
312     - github-jenkins-cfg-verify
313
314 :Optional parameters:
315
316     :branch: Git branch to build against. (default: master)
317     :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
318
319 This job is not part of the "{project-name}-ci-jobs" group. It must be called
320 explicitly.
321
322 Example:
323
324 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-verify.yaml
325    :language: yaml
326
327
328 .. _jenkins-sandbox-cleanup:
329
330 Jenkins Sandbox Cleanup
331 -----------------------
332
333 Cleanup Jenkins Sandbox of jobs and views periodically.
334
335 :Template names:
336
337     - {project-name}-jenkins-sandbox-cleanup
338     - gerrit-jenkins-sandbox-cleanup
339     - github-jenkins-sandbox-cleanup
340
341 :Comment Trigger: NONE
342
343 :Required parameters:
344
345     :build-node: The node to run build on.
346     :jenkins-ssh-credential: Credential to use for SSH. (Generally
347         should be configured in defaults.yaml)
348
349 :Optional parameters:
350
351     :cron: Schedule to run job. (default: '0 8 * * 6')
352
353
354 .. _jjb-deploy:
355
356 JJB Deploy Job
357 --------------
358
359 Deploy jobs to jenkins-sandbox system via code review comment.
360
361 This job checks out the current code review patch and then runs a
362 ``jenkins-jobs update`` to push a patch defined by the comment.
363
364 :Template names:
365
366     - {project-name}-jjb-deploy-job
367     - gerrit-jjb-deploy-job
368     - github-jjb-deploy-job
369
370 :Comment Trigger: jjb-deploy JOB_NAME
371
372     .. note::
373
374        The JJB Deploy Job is configured to trigger only if the Gerrit comment
375        starts with the `jjb-deploy` keyword.
376
377        Example of a valid command in Gerrit comment that triggers the job:
378
379        ``jjb-deploy builder-jjb-*``
380
381        Example of a invalid command in Gerrit comment that would _not_ trigger
382        the job:
383
384        ``Update the job. jjb-deploy builder-jjb-*``
385
386        JOB_NAME can include the * wildcard character to push multiple jobs
387        matching the pattern. For example ``jjb-deploy builder-jjb-*`` will push
388        all builder-jjb-* jobs to the sandbox system.
389
390 :Required parameters:
391
392     :build-node: The node to run build on.
393     :jenkins-ssh-credential: Credential to use for SSH. (Generally
394         should be configured in defaults.yaml)
395
396 :Optional parameters:
397
398     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
399     :gerrit_jjb_deploy_job_triggers: Override Gerrit Triggers.
400
401
402 .. _jjb-merge:
403
404 JJB Merge
405 ---------
406
407 Runs `jenkins-jobs update` to update production job configuration
408
409 :Template Names:
410     - {project-name}-jjb-merge
411     - gerrit-jjb-merge
412     - github-jjb-merge
413
414 :Comment Trigger: remerge
415
416 :Required parameters:
417
418     :build-node: The node to run build on.
419     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
420         be configured in defaults.yaml)
421
422 :Optional parameters:
423
424     :branch: Git branch to fetch for the build. (default: master)
425     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
426     :build-timeout: Timeout in minutes before aborting build. (default: 10)
427     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
428     :jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
429     :jjb-workers: Number of threads to run **update** with. Set to 0 by default
430         which is equivalent to the number of available CPU cores. (default: 0)
431     :jjb-version: JJB version to install. (default: see job-template)
432     :stream: Keyword that can be used to represent a release code-name.
433         Often the same as the branch. (default: master)
434     :submodule-recursive: Whether to checkout submodules recursively.
435         (default: true)
436     :submodule-timeout: Timeout (in minutes) for checkout operation.
437         (default: 10)
438     :submodule-disable: Disable submodule checkout operation.
439         (default: false)
440
441     :gerrit_merge_triggers: Override Gerrit Triggers.
442     :gerrit_trigger_file_paths: Override file paths which can be used to
443         filter which file modifications will trigger a build.
444         (default defined by lf_jjb_common)
445
446
447 .. _jjb-verify:
448
449 JJB Verify
450 ----------
451
452 Runs `jenkins-jobs test` to validate JJB syntax
453
454 :Template Names:
455     - {project-name}-jjb-verify
456     - gerrit-jjb-verify
457     - github-jjb-verify
458
459 :Comment Trigger: recheck|reverify
460
461 :Required parameters:
462
463     :build-node: The node to run build on.
464     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
465         be configured in defaults.yaml)
466
467 :Optional parameters:
468
469     :branch: Git branch to fetch for the build. (default: master)
470     :build-concurrent: Whether or not to allow this job to run multiple jobs
471         simultaneously. (default: true)
472     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
473     :build-timeout: Timeout in minutes before aborting build. (default: 10)
474     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
475     :jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
476     :jjb-version: JJB version to install. (default: see job-template)
477     :stream: Keyword that can be used to represent a release code-name.
478         Often the same as the branch. (default: master)
479     :submodule-recursive: Whether to checkout submodules recursively.
480         (default: true)
481     :submodule-timeout: Timeout (in minutes) for checkout operation.
482         (default: 10)
483     :submodule-disable: Disable submodule checkout operation.
484         (default: false)
485     :throttle_categories: List of categories to throttle by.
486     :throttle-enabled: Whether or not to enable throttling on the job.
487         (default: true)
488     :throttle-max-per-node: Max jobs to run on the same node. (default: 1)
489     :throttle-max-total: Max jobs to run across the entire project. - 0
490         means 'unlimited' (default: 0)
491     :throttle-option: Throttle by the project or by list of categories
492         defined in the throttle plugin configuration. (options: 'project',
493         'category'; default: project)
494
495     :gerrit_verify_triggers: Override Gerrit Triggers.
496     :gerrit_trigger_file_paths: Override file paths which can be used to
497         filter which file modifications will trigger a build.
498         (default defined by lf_jjb_common)
499
500 .. _jjb-verify-upstream-gjjb:
501
502 JJB Verify Upstream Global JJB
503 ------------------------------
504
505 Runs ``jenkins-jobs test`` to validate JJB syntax for upstream global-jjb
506 patches. This job is useful to notify upstream that they may be breaking
507 project level jobs.
508
509 :Template Names:
510     - {project-name}-jjb-verify-upstream-gjjb
511     - gerrit-jjb-verify-upstream-gjjb
512
513 :Comment Trigger: recheck|reverify
514
515 :Required parameters:
516
517     :build-node: The node to run build on.
518     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
519         be configured in defaults.yaml)
520
521 :Optional parameters:
522
523     :branch: Git branch to fetch for the build. (default: master)
524     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
525     :build-timeout: Timeout in minutes before aborting build. (default: 10)
526     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
527     :jjb-cache: JJB cache location. (default: $HOME/.cache/jenkins_jobs)
528     :jjb-version: JJB version to install. (default: see job-template)
529     :stream: Keyword that can be used to represent a release code-name.
530         Often the same as the branch. (default: master)
531
532 .. _info-yaml-verify:
533
534 Info YAML Verify
535 ----------------
536
537 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
538 other file changes. Verifies INFO.yaml files follow the schema defined in
539 `lfit/releng-global-jjb/schema/info-schema.yaml`.
540
541 :Template Names:
542     - {project-name}-info-yaml-verify
543     - gerrit-info-yaml-verify
544     - github-info-yaml-verify
545
546 :Required parameters:
547
548     :build-node: The node to run build on.
549     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
550         be configured in defaults.yaml)
551
552 :Optional parameters:
553
554     :branch: Git branch to fetch for the build. (default: master)
555     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
556     :build-timeout: Timeout in minutes before aborting build. (default: 10)
557     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
558     :stream: Keyword that can be used to represent a release code-name.
559         Often the same as the branch. (default: master)
560     :submodule-recursive: Whether to checkout submodules recursively.
561         (default: true)
562     :submodule-timeout: Timeout (in minutes) for checkout operation.
563         (default: 10)
564     :submodule-disable: Disable submodule checkout operation.
565         (default: false)
566
567     :gerrit_verify_triggers: Override Gerrit Triggers.
568
569 .. _license-checker:
570
571 License Checker
572 ---------------
573
574 Job to scan projects for files missing license headers.
575
576 :Template Names:
577     - {project-name}-license-check
578     - gerrit-license-check
579     - github-license-check
580
581 :Optional parameters:
582
583     :build-timeout: Timeout in minutes before aborting build. (default: 15)
584     :file-patterns: Space-separated list of file patterns to scan.
585         (default: \*.go \*.groovy \*.java \*.py \*.sh)
586     :spdx-disable: Disable the SPDX-Identifier checker. (default: false)
587     :lhc-version: Version of LHC to use. (default: 0.2.0)
588     :license-exclude-paths: Comma-separated list of paths to exclude from the
589         license checker. The paths used here will be matched using a contains
590         rule so it is best to be as precise with the path as possible.
591         For example a path of '/src/generated/' will be searched as
592         '**/src/generated/**'.
593         Example: org/opendaylight/yang/gen,protobuff/messages
594         (default: '')
595     :licenses-allowed: Comma-separated list of allowed licenses.
596         (default: Apache-2.0,EPL-1.0,MIT)
597     :project-pattern: The ANT based pattern for Gerrit Trigger to choose which
598         projects to trigger job against. (default: '**')
599
600 .. _gjjb-openstack-cron:
601
602 OpenStack Cron
603 --------------
604
605 Cron job that runs regularly to perform periodic tasks against OpenStack.
606
607 This job requires a Config File Provider file named ``clouds-yaml`` available
608 containing the credentials for the cloud.
609
610 :Template Names:
611     - {project-name}-openstack-cron
612     - gerrit-openstack-cron
613     - github-openstack-cron
614
615 :Required parameters:
616
617     :build-node: The node to run build on.
618     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
619         be configured in defaults.yaml)
620     :jenkins-urls: URLs to Jenkins systems to check for active builds.
621
622 :Optional parameters:
623
624     :branch: Git branch to fetch for the build. (default: master)
625     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
626     :build-timeout: Timeout in minutes before aborting build. (default: 90)
627     :cron: Time when the packer image should be rebuilt (default: @hourly)
628     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
629     :openstack-cloud: OS_CLOUD setting to pass to openstack client.
630         (default: vex)
631     :openstack-image-cleanup: Whether or not to run the image cleanup script.
632         (default: true)
633     :openstack-image-cleanup-age: Age in days of image before marking it for
634         removal. (default: 30)
635     :openstack-image-protect: Whether or not to run the image protect script.
636         (default: true)
637     :openstack-server-cleanup: Whether or not to run the server cleanup script.
638         (default: true)
639     :openstack-stack-cleanup: Whether or not to run the stack cleanup script.
640         (default: true)
641     :openstack-volume-cleanup: Whether or not to run the volume cleanup script.
642         (default: true)
643     :stream: Keyword that can be used to represent a release code-name.
644         Often the same as the branch. (default: master)
645     :submodule-recursive: Whether to checkout submodules recursively.
646         (default: true)
647     :submodule-timeout: Timeout (in minutes) for checkout operation.
648         (default: 10)
649     :submodule-disable: Disable submodule checkout operation.
650         (default: false)
651
652 Minimal Example:
653
654 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/openstack-cron-minimal.yaml
655
656 Full Example:
657
658 .. literalinclude:: ../../.jjb-test/lf-ci-jobs/openstack-cron-full.yaml
659
660
661 .. _gjjb-packer-merge:
662
663 Packer Merge
664 ------------
665
666 Packer Merge job runs `packer build` to build system images in the cloud.
667
668 :Template Names:
669     - {project-name}-packer-merge-{platforms}-{templates}
670     - gerrit-packer-merge
671     - github-packer-merge
672
673 :Comment Trigger: remerge
674
675 :Required parameters:
676
677     :build-node: The node to run build on.
678     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
679         be configured in defaults.yaml)
680     :mvn-settings: The name of settings file containing credentials for
681         the project.
682     :platforms: Platform or distribution to build. Typically json file
683         found in the packer/vars directory. (Example: centos)
684     :template: System template to build. Typically shell script found in
685         the packer/provision directory. (Example: java-builder)
686
687 :Optional parameters:
688
689     :cron: Time when the packer image should be rebuilt (default: @monthly)
690     :branch: Git branch to fetch for the build. (default: master)
691     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
692     :build-timeout: Timeout in minutes before aborting build. (default: 90)
693     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
694     :openstack: Packer template uses an OpenStack builder (default: true).
695     :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
696         (default: vex).
697     :packer-cloud-settings: Name of settings file containing credentials
698         for the cloud that packer will build on. (default: packer-cloud-env)
699     :packer-version: Version of packer to install / use in build. (default: 1.0.2)
700     :stream: Keyword that can be used to represent a release code-name.
701         Often the same as the branch. (default: master)
702     :submodule-recursive: Whether to checkout submodules recursively.
703         (default: true)
704     :submodule-timeout: Timeout (in minutes) for checkout operation.
705         (default: 10)
706     :submodule-disable: Disable submodule checkout operation.
707         (default: false)
708
709     :gerrit_verify_triggers: Override Gerrit Triggers.
710
711 Test an in-progress patch
712 ^^^^^^^^^^^^^^^^^^^^^^^^^
713
714 To test an in-progress patch from a GitHub Pull Request. Upload this
715 job to the :doc:`Jenkins Sandbox <lfdocs:jenkins-sandbox>`. Then when manually
716 building the job replace the GERRIT_REFSPEC parameter with the GitHub Pull
717 Request number of the patch you would like to test.
718
719 Example GitHub:
720
721 .. code-block:: none
722
723    GERRIT_REFSPEC: origin/pr/49/merge
724
725 .. _gjjb-packer-verify:
726
727 Packer Verify
728 -------------
729
730 Packer Verify job runs `packer validate` to verify packer configuration.
731
732 :Template Names:
733     - {project-name}-packer-verify
734     - gerrit-packer-verify
735     - github-packer-verify
736
737 :Comment Trigger: recheck|reverify
738
739 :Required parameters:
740
741     :build-node: The node to run build on.
742     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
743         be configured in defaults.yaml)
744     :mvn-settings: The name of settings file containing credentials for
745         the project.
746
747 :Optional parameters:
748
749     :branch: Git branch to fetch for the build. (default: master)
750     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
751     :build-timeout: Timeout in minutes before aborting build. (default: 10)
752     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
753     :openstack: Packer template uses an OpenStack builder (default: true).
754     :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
755         (default: vex).
756     :packer-cloud-settings: Name of settings file containing credentials
757         for the cloud that packer will build on. (default: packer-cloud-env)
758     :packer-version: Version of packer to install / use in build. (default: 1.0.2)
759     :stream: Keyword that can be used to represent a release code-name.
760         Often the same as the branch. (default: master)
761     :submodule-recursive: Whether to checkout submodules recursively.
762         (default: true)
763     :submodule-timeout: Timeout (in minutes) for checkout operation.
764         (default: 10)
765     :submodule-disable: Disable submodule checkout operation.
766         (default: false)
767
768     :gerrit_verify_triggers: Override Gerrit Triggers.
769     :gerrit_trigger_file_paths: Override file paths which can be used to
770         filter which file modifications will trigger a build.
771
772
773 Puppet Verify
774 -------------
775
776 Runs puppet-lint in the ``puppet-dir`` directory. puppet-lint runs recursively,
777 the base directory is usually the best place to run from.
778
779 :Template Names:
780
781     - {project-name}-puppet-verify
782     - gerrit-puppet-verify
783     - github-puppet-verify
784
785 :Comment Trigger: recheck|reverify
786
787 :Required Parameters:
788
789     :build-node: The node to run build on.
790     :jenkins-ssh-credential: Credential to use for SSH. (Generally set
791         in defaults.yaml)
792
793 :Optional Parameters:
794
795     :branch: The branch to build against. (default: master)
796     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
797     :build-timeout: Timeout in minutes before aborting build. (default: 15)
798     :gerrit_trigger_file_paths: Override file paths which used to filter which
799         file modifications will trigger a build. Refer to JJB documentation for
800         "file-path" details.
801         https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.gerrit
802     :git-url: URL clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
803     :puppet-dir: Directory containing the project's puppet module(s) relative
804         to the workspace.
805         (default: '')
806     :puppet-lint-version: Version of puppet-lint to use for testing.
807         (default: 2.3.6)
808     :stream: Keyword representing a release code-name.
809         Often the same as the branch. (default: master)
810     :submodule-recursive: Whether to checkout submodules recursively.
811         (default: true)
812     :submodule-timeout: Timeout (in minutes) for checkout operation.
813         (default: 10)
814     :submodule-disable: Disable submodule checkout operation.
815         (default: false)