Class 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
  • Constructor Details

    • 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 Details

    • 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 a FetchCommand is executed to allow extensions to alter its behaviour.
      Overrides:
      decorateFetchCommand in class GitSCMExtension
      Parameters:
      scm - GitSCM object
      run - Run when fetch is called for Run. null during Job polling.
      git - GitClient
      listener - build log
      cmd - fetch command to be decorated
      Throws:
      IOException - on input or output error
      InterruptedException - when interrupted
      hudson.plugins.git.GitException - on git error
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object