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 class
GitPublisher.BranchToPush
static class
GitPublisher.DescriptorImpl
static class
GitPublisher.NoteToPush
static class
GitPublisher.PushConfig
static class
GitPublisher.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.GitClient
getGitClient(GitSCM gitSCM, BuildListener listener, EnvVars environment, AbstractBuild<?,?> build, org.jenkinsci.plugins.gitclient.UnsupportedCommand cmd)
List<GitPublisher.NoteToPush>
getNotesToPush()
BuildStepMonitor
getRequiredMonitorService()
List<GitPublisher.TagToPush>
getTagsToPush()
boolean
isForcePush()
boolean
isPushBranches()
boolean
isPushMerge()
boolean
isPushNotes()
boolean
isPushOnlyIfSuccess()
boolean
isPushTags()
boolean
perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
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.-
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:
getRequiredMonitorService
in 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.GitException
IOException
InterruptedException
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
- Throws:
InterruptedException
IOException
-
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.
-
-