Skip to content

Commit

Permalink
Merge branch 'jenkinsci:master' into update-notifyCommit-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sirine707 authored Aug 20, 2024
2 parents cff0e47 + da6948a commit a0d77b1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ This removes remote tracking branches and tags from the local workspace if they
----
checkout scmGit(
branches: [[name: 'master']],
extensions: [pruneStaleBranch(), pruneTags(true)],
extensions: [ pruneStaleBranch(), pruneTags(true) ],
userRemoteConfigs: [[url: 'https://github.com/jenkinsci/ws-cleanup-plugin']])
----

Expand Down Expand Up @@ -1090,6 +1090,16 @@ Path::

File or directory to be included in the checkout

[source,groovy]
----
checkout scmGit(
branches: [[name: 'master']],
extensions: [
sparseCheckout(sparseCheckoutPaths: [[path: 'src'], [path: 'Makefile']])
],
userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-plugin.git']])
----

[#git-lfs-pull-after-checkout]
==== Git LFS pull after checkout

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.jenkinsci.plugins.gitclient.GitClient;
import org.jenkinsci.plugins.gitclient.UnsupportedCommand;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted;
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;
import edu.umd.cs.findbugs.annotations.NonNull;

Expand Down Expand Up @@ -52,10 +53,11 @@ public void determineSupportForJGit(GitSCM scm, @NonNull UnsupportedCommand cmd)
}

@Extension
@Symbol("sparseCheckout")
public static class DescriptorImpl extends GitSCMExtensionDescriptor {
@Override
public String getDisplayName() {
return "Sparse Checkout paths";
return "Sparse checkout paths";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ private String randomPipelineExtensions() {
"pruneTags()",
"pruneTags(false)",
"pruneTags(true)",
"sparseCheckout(sparseCheckoutPaths: [[path: 'src'], [path: 'Makefile']])",
"submodule(disableSubmodules: true)",
"submodule(depth: 1, shallow: true)",
"submodule(parentCredentials: true, recursiveSubmodules: true, threads: 13)",
Expand Down

0 comments on commit a0d77b1

Please sign in to comment.