Package com.dabsquared.gitlabjenkins
Class GitLabPushTrigger
- All Implemented Interfaces:
MergeRequestTriggerConfig
,ExtensionPoint
,Describable<Trigger<?>>
Triggers a build when we receive a GitLab WebHook.
- Author:
- Daniel Brooks
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.Cron
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGitLabPushTrigger
(boolean triggerOnPush, boolean triggerToBranchDeleteRequest, boolean triggerOnMergeRequest, boolean triggerOnlyIfNewCommitsPushed, boolean triggerOnAcceptedMergeRequest, boolean triggerOnClosedMergeRequest, TriggerOpenMergeRequest triggerOpenMergeRequestOnPush, boolean triggerOnNoteRequest, String noteRegex, boolean skipWorkInProgressMergeRequest, boolean ciSkip, String labelsThatForcesBuildIfAdded, boolean setBuildDescription, boolean addNoteOnMergeRequest, boolean addCiMessage, boolean addVoteOnMergeRequest, boolean acceptMergeRequestOnSuccess, BranchFilterType branchFilterType, String includeBranchesSpec, String excludeBranchesSpec, String sourceBranchRegex, String targetBranchRegex, MergeRequestLabelFilterConfig mergeRequestLabelFilterConfig, String secretToken, boolean triggerOnPipelineEvent, boolean triggerOnApprovedMergeRequest, String pendingBuildName, boolean cancelPendingBuildsOnUpdate) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
boolean
static GitLabPushTrigger
getFromJob
(Job<?, ?> job) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
static void
void
onPost
(MergeRequestHook hook) void
void
onPost
(PipelineHook hook) void
protected Object
void
setAcceptMergeRequestOnSuccess
(boolean acceptMergeRequestOnSuccess) void
setAddCiMessage
(boolean addCiMessage) void
setAddNoteOnMergeRequest
(boolean addNoteOnMergeRequest) void
setAddVoteOnMergeRequest
(boolean addVoteOnMergeRequest) void
setBranchFilterName
(String branchFilterName) void
setBranchFilterType
(BranchFilterType branchFilterType) void
setCancelPendingBuildsOnUpdate
(boolean cancelPendingBuildsOnUpdate) void
setCiSkip
(boolean ciSkip) void
setExcludeBranchesSpec
(String excludeBranchesSpec) void
setIncludeBranchesSpec
(String includeBranchesSpec) void
setLabelsThatForcesBuildIfAdded
(String labelsThatForcesBuildIfAdded) void
setMergeRequestLabelFilterConfig
(MergeRequestLabelFilterConfig mergeRequestLabelFilterConfig) void
setNoteRegex
(String noteRegex) void
setPendingBuildName
(String pendingBuildName) void
setSecretToken
(String secretToken) void
setSetBuildDescription
(boolean setBuildDescription) void
setSkipWorkInProgressMergeRequest
(boolean skipWorkInProgressMergeRequest) void
setSourceBranchRegex
(String sourceBranchRegex) void
setTargetBranchRegex
(String targetBranchRegex) void
setTriggerOnAcceptedMergeRequest
(boolean triggerOnAcceptedMergeRequest) void
setTriggerOnApprovedMergeRequest
(boolean triggerOnApprovedMergeRequest) void
setTriggerOnClosedMergeRequest
(boolean triggerOnClosedMergeRequest) void
setTriggerOnlyIfNewCommitsPushed
(boolean triggerOnlyIfNewCommitsPushed) void
setTriggerOnMergeRequest
(boolean triggerOnMergeRequest) void
setTriggerOnNoteRequest
(boolean triggerOnNoteRequest) void
setTriggerOnPipelineEvent
(boolean triggerOnPipelineEvent) void
setTriggerOnPush
(boolean triggerOnPush) void
setTriggerOpenMergeRequestOnPush
(TriggerOpenMergeRequest triggerOpenMergeRequestOnPush) void
setTriggerToBranchDeleteRequest
(boolean triggerToBranchDeleteRequest) Methods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getDescriptor, getProjectAction, getProjectActions, getSpec, run, start, stop, toString
-
Constructor Details
-
GitLabPushTrigger
@Deprecated public GitLabPushTrigger(boolean triggerOnPush, boolean triggerToBranchDeleteRequest, boolean triggerOnMergeRequest, boolean triggerOnlyIfNewCommitsPushed, boolean triggerOnAcceptedMergeRequest, boolean triggerOnClosedMergeRequest, TriggerOpenMergeRequest triggerOpenMergeRequestOnPush, boolean triggerOnNoteRequest, String noteRegex, boolean skipWorkInProgressMergeRequest, boolean ciSkip, String labelsThatForcesBuildIfAdded, boolean setBuildDescription, boolean addNoteOnMergeRequest, boolean addCiMessage, boolean addVoteOnMergeRequest, boolean acceptMergeRequestOnSuccess, BranchFilterType branchFilterType, String includeBranchesSpec, String excludeBranchesSpec, String sourceBranchRegex, String targetBranchRegex, MergeRequestLabelFilterConfig mergeRequestLabelFilterConfig, String secretToken, boolean triggerOnPipelineEvent, boolean triggerOnApprovedMergeRequest, String pendingBuildName, boolean cancelPendingBuildsOnUpdate) Deprecated.useGitLabPushTrigger()
with setters to configure an instance of this class. -
GitLabPushTrigger
@DataBoundConstructor public GitLabPushTrigger()
-
-
Method Details
-
migrateJobs
- Throws:
IOException
-
getTriggerOnPush
public boolean getTriggerOnPush() -
getTriggerToBranchDeleteRequest
public boolean getTriggerToBranchDeleteRequest() -
getTriggerOnMergeRequest
public boolean getTriggerOnMergeRequest()- Specified by:
getTriggerOnMergeRequest
in interfaceMergeRequestTriggerConfig
-
isTriggerOnlyIfNewCommitsPushed
public boolean isTriggerOnlyIfNewCommitsPushed()- Specified by:
isTriggerOnlyIfNewCommitsPushed
in interfaceMergeRequestTriggerConfig
-
isTriggerOnAcceptedMergeRequest
public boolean isTriggerOnAcceptedMergeRequest()- Specified by:
isTriggerOnAcceptedMergeRequest
in interfaceMergeRequestTriggerConfig
-
isTriggerOnApprovedMergeRequest
public boolean isTriggerOnApprovedMergeRequest()- Specified by:
isTriggerOnApprovedMergeRequest
in interfaceMergeRequestTriggerConfig
-
isTriggerOnClosedMergeRequest
public boolean isTriggerOnClosedMergeRequest()- Specified by:
isTriggerOnClosedMergeRequest
in interfaceMergeRequestTriggerConfig
-
getTriggerOnNoteRequest
public boolean getTriggerOnNoteRequest() -
getTriggerOnPipelineEvent
public boolean getTriggerOnPipelineEvent() -
getNoteRegex
-
getTriggerOpenMergeRequestOnPush
- Specified by:
getTriggerOpenMergeRequestOnPush
in interfaceMergeRequestTriggerConfig
-
getSetBuildDescription
public boolean getSetBuildDescription() -
getCiSkip
public boolean getCiSkip() -
isSkipWorkInProgressMergeRequest
public boolean isSkipWorkInProgressMergeRequest()- Specified by:
isSkipWorkInProgressMergeRequest
in interfaceMergeRequestTriggerConfig
-
getLabelsThatForcesBuildIfAdded
- Specified by:
getLabelsThatForcesBuildIfAdded
in interfaceMergeRequestTriggerConfig
-
getBranchFilterType
-
getIncludeBranchesSpec
-
getExcludeBranchesSpec
-
getSourceBranchRegex
-
getTargetBranchRegex
-
getMergeRequestLabelFilterConfig
-
getSecretToken
-
getPendingBuildName
-
getCancelPendingBuildsOnUpdate
public boolean getCancelPendingBuildsOnUpdate()- Specified by:
getCancelPendingBuildsOnUpdate
in interfaceMergeRequestTriggerConfig
-
setTriggerOnPush
@DataBoundSetter public void setTriggerOnPush(boolean triggerOnPush) -
setTriggerToBranchDeleteRequest
@DataBoundSetter public void setTriggerToBranchDeleteRequest(boolean triggerToBranchDeleteRequest) -
setTriggerOnApprovedMergeRequest
@DataBoundSetter public void setTriggerOnApprovedMergeRequest(boolean triggerOnApprovedMergeRequest) -
setTriggerOnMergeRequest
@DataBoundSetter public void setTriggerOnMergeRequest(boolean triggerOnMergeRequest) -
setTriggerOnlyIfNewCommitsPushed
@DataBoundSetter public void setTriggerOnlyIfNewCommitsPushed(boolean triggerOnlyIfNewCommitsPushed) -
setTriggerOnAcceptedMergeRequest
@DataBoundSetter public void setTriggerOnAcceptedMergeRequest(boolean triggerOnAcceptedMergeRequest) -
setTriggerOnClosedMergeRequest
@DataBoundSetter public void setTriggerOnClosedMergeRequest(boolean triggerOnClosedMergeRequest) -
setTriggerOpenMergeRequestOnPush
@DataBoundSetter public void setTriggerOpenMergeRequestOnPush(TriggerOpenMergeRequest triggerOpenMergeRequestOnPush) -
setTriggerOnNoteRequest
@DataBoundSetter public void setTriggerOnNoteRequest(boolean triggerOnNoteRequest) -
setNoteRegex
-
setCiSkip
@DataBoundSetter public void setCiSkip(boolean ciSkip) -
setSkipWorkInProgressMergeRequest
@DataBoundSetter public void setSkipWorkInProgressMergeRequest(boolean skipWorkInProgressMergeRequest) -
setLabelsThatForcesBuildIfAdded
-
setSetBuildDescription
@DataBoundSetter public void setSetBuildDescription(boolean setBuildDescription) -
setAddNoteOnMergeRequest
@DataBoundSetter public void setAddNoteOnMergeRequest(boolean addNoteOnMergeRequest) -
setAddCiMessage
@DataBoundSetter public void setAddCiMessage(boolean addCiMessage) -
setAddVoteOnMergeRequest
@DataBoundSetter public void setAddVoteOnMergeRequest(boolean addVoteOnMergeRequest) -
setBranchFilterName
-
setBranchFilterType
-
setIncludeBranchesSpec
-
setExcludeBranchesSpec
-
setSourceBranchRegex
-
setTargetBranchRegex
-
setMergeRequestLabelFilterConfig
@DataBoundSetter public void setMergeRequestLabelFilterConfig(MergeRequestLabelFilterConfig mergeRequestLabelFilterConfig) -
setSecretToken
-
setAcceptMergeRequestOnSuccess
@DataBoundSetter public void setAcceptMergeRequestOnSuccess(boolean acceptMergeRequestOnSuccess) -
getAcceptMergeRequestOnSuccess
public boolean getAcceptMergeRequestOnSuccess() -
getAddCiMessage
public boolean getAddCiMessage() -
getAddNoteOnMergeRequest
public boolean getAddNoteOnMergeRequest() -
getAddVoteOnMergeRequest
public boolean getAddVoteOnMergeRequest() -
getSkipWorkInProgressMergeRequest
public boolean getSkipWorkInProgressMergeRequest() -
getBranchFilterName
-
setTriggerOnPipelineEvent
@DataBoundSetter public void setTriggerOnPipelineEvent(boolean triggerOnPipelineEvent) -
setPendingBuildName
-
setCancelPendingBuildsOnUpdate
@DataBoundSetter public void setCancelPendingBuildsOnUpdate(boolean cancelPendingBuildsOnUpdate) -
onPost
-
onPost
-
onPost
-
onPost
-
readResolve
- Overrides:
readResolve
in classTrigger<Job<?,
?>> - Throws:
ObjectStreamException
-
getFromJob
-
GitLabPushTrigger()
with setters to configure an instance of this class.