You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+182-6Lines changed: 182 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,10 +141,10 @@ JGit becomes available throughout Jenkins once it has been enabled.
141
141
Folder containing a repository that will be used by git as a reference during submodule clone operations.
142
142
This option will be ignored if the folder is not available on the agent running the build.
143
143
A reference repository may contain multiple subprojects.
144
-
See the [combining repositories](#combining-repositories) section for more details.
144
+
See the <ahref="#combining-repositories">combining repositories</a> section for more details.
145
145
</dd>
146
146
147
-
<dt>Timeout (in minutes) for submodules operations</dt>
147
+
<dt>Timeout (in minutes) for submodule operations</dt>
148
148
<dd>
149
149
Specify a timeout (in minutes) for submodules operations.
150
150
This option overrides the default timeout.
@@ -228,28 +228,203 @@ Pipeline is the robust and feature-rich way to checkout from multiple repositori
228
228
<dt>user.name</dt>
229
229
<dd>
230
230
Defines the user name value which git will assign to new commits made in the workspace.
231
-
If given, `git config user.name [this]` is called before builds.
231
+
If given, <code>git config user.name [this]</code> is called before builds.
232
232
This overrides values from the global settings.
233
233
</dd>
234
234
235
235
<dt>user.email</dt>
236
236
<dd>
237
237
Defines the user email value which git will assign to new commits made in the workspace.
238
-
If given, `git config user.email [this]` is called before builds.
238
+
If given, <code>git config user.email [this]</code> is called before builds.
239
239
This overrides whatever is in the global settings.
240
240
</dd>
241
241
242
242
</dl>
243
243
244
+
### Don't trigger a build on commit notifications
245
+
246
+
If checked, this repository will be ignored when the notifyCommit URL is accessed regardless of if the repository matches or not.
247
+
248
+
### Force polling using workspace
249
+
250
+
The git plugin polls remotely using `ls-remote` when configured with a single branch (no wildcards!).
251
+
When this extension is enabled, the polling is performed from a cloned copy of the workspace instead of using `ls-remote`.
252
+
253
+
If this option is selected, polling will use a workspace instead of using `ls-remote`.
254
+
255
+
### Git LFS pull after checkout
256
+
257
+
Enable [git large file support](https://git-lfs.github.com/) for the workspace by pulling large files after the checkout completes.
258
+
Requires that the master and each agent performing an LFS checkout have installed the `git lfs` command.
259
+
260
+
### Merge before build
261
+
262
+
These options allow you to perform a merge to a particular branch before building.
263
+
For example, you could specify an integration branch to be built, and to merge to master.
264
+
In this scenario, on every change of integration, Jenkins will perform a merge with the master branch, and try to perform a build if the merge is successful.
265
+
It then may push the merge back to the remote repository if the Git Push post-build action is selected.
266
+
267
+
<dl>
268
+
269
+
<dt>Name of repository</dt>
270
+
<dd>
271
+
Name of the repository, such as <code>origin</code>, that contains the branch.
272
+
If left blank, it'll default to the name of the first repository configured.
273
+
</dd>
274
+
275
+
<dt>Branch to merge to</dt>
276
+
<dd>
277
+
The name of the branch within the named repository to merge to, such as <code>master</code>.
278
+
</dd>
279
+
280
+
<dt>Merge strategy</dt>
281
+
<dd>
282
+
Merge strategy selection. Choices include:
283
+
<ul>
284
+
<li>default</li>
285
+
<li>resolve</li>
286
+
<li>recursive</li>
287
+
<li>octopus</li>
288
+
<li>ours</li>
289
+
<li>subtree</li>
290
+
<li>recursive_theirs</li>
291
+
</ul>
292
+
</dd>
293
+
294
+
<dt>Fast-forward mode</dt>
295
+
<dd>
296
+
<ul>
297
+
<li><code>--ff</code>: fast-forward which gracefully falls back to a merge commit when required</li>
298
+
<li><code>--ff-only</code>: fast-forward without any fallback</li>
299
+
<li><code>--no-ff</code>: merge commit always, even if a ast-forwardwould have been allowed</li>
300
+
</ul>
301
+
</dd>
302
+
303
+
</dl>
304
+
305
+
### Polling ignores commits from certain users
306
+
307
+
These options allow you to perform a merge to a particular branch before building.
308
+
For example, you could specify an integration branch to be built, and to merge to master.
309
+
In this scenario, on every change of integration, Jenkins will perform a merge with the master branch, and try to perform a build if the merge is successful.
310
+
It then may push the merge back to the remote repository if the Git Push post-build action is selected.
311
+
312
+
<dl>
313
+
314
+
<dt>Excluded Users</dt>
315
+
<dd>
316
+
If set and Jenkins is configured to poll for changes, Jenkins will ignore any revisions committed by users in this list when determining if a build should be triggered.
317
+
This can be used to exclude commits done by the build itself from triggering another build, assuming the build server commits the change with a distinct SCM user.
318
+
Using this behaviour will preclude the faster <code>git ls-remote</code> polling mechanism, forcing polling to require a workspace, as if you had selected the Force polling using workspace extension as well.
319
+
320
+
<p>Each exclusion uses literal pattern matching, and must be separated by a new line.</p>
321
+
</dd>
322
+
323
+
</dl>
324
+
325
+
### Polling ignores commits in certain paths
326
+
327
+
If set and Jenkins is configured to poll for changes, Jenkins will pay attention to included and/or excluded files and/or folders when determining if a build needs to be triggered.
328
+
329
+
Using this behaviour will preclude the faster remote polling mechanism, forcing polling to require a workspace thus sometimes triggering unwanted builds, as if you had selected the Force polling using workspace extension as well.
330
+
This can be used to exclude commits done by the build itself from triggering another build, assuming the build server commits the change with a distinct SCM user.
331
+
Using this behaviour will preclude the faster <code>git ls-remote</code> polling mechanism, forcing polling to require a workspace, as if you had selected the Force polling using workspace extension as well.
332
+
333
+
<dl>
334
+
335
+
<dt>Included Regions</dt>
336
+
<dd>
337
+
Each inclusion uses <ahref="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">java regular expression pattern matching</a>, and must be separated by a new line.
338
+
An empty list implies that everything is included.
339
+
</dd>
340
+
341
+
<dt>Excluded Regions</dt>
342
+
<dd>
343
+
Each exclusion uses <ahref="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">java regular expression pattern matching</a>, and must be separated by a new line.
344
+
An empty list excludes nothing.
345
+
</dd>
346
+
347
+
</dl>
348
+
349
+
### Polling ignores commits with certain messages
350
+
351
+
<dl>
352
+
353
+
<dt>Excluded Messages</dt>
354
+
<dd>
355
+
If set and Jenkins is set to poll for changes, Jenkins will ignore any revisions committed with message matched to Pattern when determining if a build needs to be triggered.
356
+
This can be used to exclude commits done by the build itself from triggering another build, assuming the build server commits the change with a distinct message.
<p>You can create more complex patterns using embedded flag expressions.
361
+
362
+
<p><code>(?s).*FOO.*</code>
363
+
364
+
<p>This example will search FOO message in all comment lines.
365
+
366
+
</dd>
367
+
368
+
</dl>
369
+
244
370
### Prune stale remote tracking branches
245
371
246
372
Runs `git remote prune` for each remote to prune obsolete local branches.
247
373
374
+
### Sparse Checkout paths
375
+
376
+
Specify the paths that you'd like to sparse checkout.
377
+
This may be used for saving space (Think about a reference repository).
378
+
Be sure to use a recent version of Git, at least above 1.7.10.
379
+
380
+
Multiple sparse checkout path values can be added to a single job.
381
+
382
+
<dt>Path</dt>
383
+
<dd>
384
+
File or directory to be included in the checkout
385
+
</dd>
386
+
387
+
</dl>
388
+
389
+
### Strategy for choosing what to build
390
+
391
+
When you are interested in using a job to build multiple branches, you can choose how Jenkins chooses the branches to build and the order they should be built.
392
+
393
+
This extension point in Jenkins is used by many other plugins to control the job as it builds specific commits.
394
+
When you activate those plugins, you may see them installing a custom build strategy.
395
+
396
+
<dl>
397
+
398
+
<dt>Ancestry</dt>
399
+
<dd>
400
+
<code>Maximum Age of Commit</code>: The maximum age of a commit (in days) for it to be built. This uses the GIT_COMMITTER_DATE, not GIT_AUTHOR_DATE
401
+
<p><code>Commit in Ancestry</code>: If an ancestor commit (sha1) is provided, only branches with this commit in their history will be built.
402
+
</dd>
403
+
404
+
<dt>Default</dt>
405
+
<dd>
406
+
Build all the branches that match the branch namne pattern.
407
+
</dd>
408
+
409
+
<dt>Inverse</dt>
410
+
<dd>
411
+
Build all branches <b>except</b> for those which match the branch specifiers configure above.
412
+
This is useful, for example, when you have jobs building your master and various release branches and you want a second job which builds all new feature branches.
413
+
For example, branches which do not match these patterns without redundantly building master and the release branches again each time they change.
414
+
</dd>
415
+
416
+
</dl>
417
+
248
418
### Use commit author in changelog
249
419
250
420
The default behavior is to use the Git commit's "Committer" value in build changesets.
251
421
If this option is selected, the git commit's "Author" value is used instead.
252
422
423
+
### Wipe out repository and force clone
424
+
425
+
Delete the contents of the workspace before build and before checkout.
426
+
This deletes the git repository inside the workspace and will force a full clone.
427
+
253
428
## Environment Variables
254
429
255
430
## Properties
@@ -260,8 +435,8 @@ Some git plugin settings can only be controlled from command line properties set
260
435
261
436
<dt>Default timeout</dt>
262
437
<dd>
263
-
The default initial git timeout value can be overridden through the property `org.jenkinsci.plugins.gitclient.Git.timeOut` (see JENKINS-11286) ).
264
-
The property should be set on both master and agent to have effect (see JENKINS-22547).
438
+
The default initial git timeout value can be overridden through the property <code>org.jenkinsci.plugins.gitclient.Git.timeOut</code> (see <ahref="https://issues.jenkins-ci.org/browse/JENKINS-11286">JENKINS-11286</a>) ).
439
+
The property should be set on both master and agent to have effect (see <ahref="https://issues.jenkins-ci.org/browse/JENKINS-22547">JENKINS-22547</a>).
265
440
</dd>
266
441
267
442
</dl>
@@ -270,6 +445,7 @@ Some git plugin settings can only be controlled from command line properties set
270
445
271
446
A single reference repository may contain commits from multiple repositories.
272
447
For example, if a repository named `parent` includes references to submodules `child-1` and `child-2`, a reference repository could be created to cache commits from all three repositories using the commands:
0 commit comments