Package hudson.plugins.git
Class GitPublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- hudson.plugins.git.GitPublisher
-
- All Implemented Interfaces:
ExtensionPoint,Describable<Publisher>,BuildStep,Serializable
public class GitPublisher extends Recorder implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGitPublisher.BranchToPushstatic classGitPublisher.DescriptorImplstatic classGitPublisher.NoteToPushstatic classGitPublisher.PushConfigstatic classGitPublisher.TagToPush-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description GitPublisher(List<GitPublisher.TagToPush> tagsToPush, List<GitPublisher.BranchToPush> branchesToPush, List<GitPublisher.NoteToPush> notesToPush, boolean pushOnlyIfSuccess, boolean pushMerge, boolean forcePush)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<GitPublisher.BranchToPush>getBranchesToPush()protected org.jenkinsci.plugins.gitclient.GitClientgetGitClient(GitSCM gitSCM, BuildListener listener, EnvVars environment, AbstractBuild<?,?> build, org.jenkinsci.plugins.gitclient.UnsupportedCommand cmd)List<GitPublisher.NoteToPush>getNotesToPush()BuildStepMonitorgetRequiredMonitorService()List<GitPublisher.TagToPush>getTagsToPush()booleanisForcePush()booleanisPushBranches()booleanisPushMerge()booleanisPushNotes()booleanisPushOnlyIfSuccess()booleanisPushTags()booleanperform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)protected ObjectreadResolve()Handles migration from earlier version - if we were pushing merges, we'll be instantiated but tagsToPush will be null rather than empty.-
Methods inherited from class hudson.tasks.Recorder
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuild
-
-
-
-
Constructor Detail
-
GitPublisher
@DataBoundConstructor public GitPublisher(List<GitPublisher.TagToPush> tagsToPush, List<GitPublisher.BranchToPush> branchesToPush, List<GitPublisher.NoteToPush> notesToPush, boolean pushOnlyIfSuccess, boolean pushMerge, boolean forcePush)
-
-
Method Detail
-
isPushOnlyIfSuccess
public boolean isPushOnlyIfSuccess()
-
isPushMerge
public boolean isPushMerge()
-
isForcePush
public boolean isForcePush()
-
isPushTags
public boolean isPushTags()
-
isPushBranches
public boolean isPushBranches()
-
isPushNotes
public boolean isPushNotes()
-
getTagsToPush
public List<GitPublisher.TagToPush> getTagsToPush()
-
getBranchesToPush
public List<GitPublisher.BranchToPush> getBranchesToPush()
-
getNotesToPush
public List<GitPublisher.NoteToPush> getNotesToPush()
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorServicein interfaceBuildStep
-
getGitClient
protected org.jenkinsci.plugins.gitclient.GitClient getGitClient(GitSCM gitSCM, BuildListener listener, EnvVars environment, AbstractBuild<?,?> build, org.jenkinsci.plugins.gitclient.UnsupportedCommand cmd) throws hudson.plugins.git.GitException, IOException, InterruptedException
- Throws:
hudson.plugins.git.GitExceptionIOExceptionInterruptedException
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
- Specified by:
performin interfaceBuildStep- Overrides:
performin classBuildStepCompatibilityLayer- Throws:
InterruptedExceptionIOException
-
readResolve
protected Object readResolve()
Handles migration from earlier version - if we were pushing merges, we'll be instantiated but tagsToPush will be null rather than empty.- Returns:
- This.
-
-