Package com.cloudbees.jenkins
Class GitHubPushTrigger
- All Implemented Interfaces:
GitHubTrigger
,ExtensionPoint
,Describable<Trigger<?>>
Triggers a build when we receive a GitHub post-commit webhook.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.Cron
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface com.cloudbees.jenkins.GitHubTrigger
GitHubTrigger.GitHubRepositoryNameContributorImpl
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Set to false to prevent the user from overriding the hook URL. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the file that records the last/current polling activity.Collection
<? extends Action> void
onPost()
Deprecated.void
onPost
(GitHubTriggerEvent event) Called when a POST is made.void
Called when a POST is made.void
Tries to register hook for current associated job.void
void
stop()
Methods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getProjectAction, getSpec, readResolve, run, toString
-
Field Details
-
ALLOW_HOOKURL_OVERRIDE
public static final boolean ALLOW_HOOKURL_OVERRIDESet to false to prevent the user from overriding the hook URL.
-
-
Constructor Details
-
GitHubPushTrigger
@DataBoundConstructor public GitHubPushTrigger()
-
-
Method Details
-
onPost
Deprecated.Called when a POST is made.- Specified by:
onPost
in interfaceGitHubTrigger
-
onPost
Called when a POST is made.- Specified by:
onPost
in interfaceGitHubTrigger
-
onPost
Called when a POST is made. -
getLogFile
Returns the file that records the last/current polling activity. -
getGitHubRepositories
Description copied from interface:GitHubTrigger
Obtains the list of the repositories that this trigger is looking at. If the implementation of this class maintain its own list of GitHub repositories, it should continue to implement this method for backward compatibility, and it gets picked up byGitHubRepositoryNameContributor.parseAssociatedNames(AbstractProject)
.Alternatively, if the implementation doesn't worry about the backward compatibility, it can implement this method to return an empty collection, then just implement
GitHubRepositoryNameContributor
.- Specified by:
getGitHubRepositories
in interfaceGitHubTrigger
-
start
-
registerHooks
public void registerHooks()Tries to register hook for current associated job. Do this lazily to avoid blocking the UI thread. Useful for using from groovy scripts.- Since:
- 1.11.2
-
stop
public void stop() -
getProjectActions
- Overrides:
getProjectActions
in classTrigger<Job<?,
?>>
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Trigger<?>>
- Overrides:
getDescriptor
in classTrigger<Job<?,
?>>
-
GitHubRepositoryNameContributor.parseAssociatedNames(AbstractProject)