Class PruneStaleTag
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<GitSCMExtension>
-
- hudson.plugins.git.extensions.GitSCMExtension
-
- hudson.plugins.git.extensions.impl.PruneStaleTag
-
- All Implemented Interfaces:
Describable<GitSCMExtension>
public class PruneStaleTag extends GitSCMExtension
Prune stale local tags that do not exist on any remote.- Since:
- 4.3.0
- Author:
- Nikolas Falco
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PruneStaleTag.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description PruneStaleTag(boolean pruneTags)
Control pruning of tags that exist in the local repository but not in any remote repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decorateFetchCommand(GitSCM scm, Run<?,?> run, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, org.jenkinsci.plugins.gitclient.FetchCommand cmd)
Called before aFetchCommand
is executed to allow extensions to alter its behaviour.boolean
equals(Object o)
boolean
getPruneTags()
Needed for pipeline syntax generator.int
hashCode()
String
toString()
-
Methods inherited from class hudson.plugins.git.extensions.GitSCMExtension
beforeCheckout, beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateCloneCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, determineSupportForJGit, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, getWorkingDirectory, isRevExcluded, onCheckoutCompleted, onCheckoutCompleted, onClean, populateEnvironmentVariables, requiresWorkspaceForPolling
-
-
-
-
Constructor Detail
-
PruneStaleTag
@DataBoundConstructor public PruneStaleTag(boolean pruneTags)
Control pruning of tags that exist in the local repository but not in any remote repository. If pruneTags is true, then local tags will be deleted if no corresponding tag exists in at least one of the remote repositories.- Parameters:
pruneTags
- if true, tags not found in any remote are deleted from local repository
-
-
Method Detail
-
getPruneTags
public boolean getPruneTags()
Needed for pipeline syntax generator.- Returns:
true
if this extension is enable,false
otherwise.
-
decorateFetchCommand
public void decorateFetchCommand(GitSCM scm, @CheckForNull Run<?,?> run, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, org.jenkinsci.plugins.gitclient.FetchCommand cmd) throws IOException, InterruptedException, hudson.plugins.git.GitException
Called before aFetchCommand
is executed to allow extensions to alter its behaviour.- Overrides:
decorateFetchCommand
in classGitSCMExtension
- Parameters:
scm
- GitSCM objectrun
- Run when fetch is called for Run. null during Job polling.git
- GitClientlistener
- build logcmd
- fetch command to be decorated- Throws:
IOException
- on input or output errorInterruptedException
- when interruptedhudson.plugins.git.GitException
- on git error
-
-