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 ClassesNested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.CronNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface com.cloudbees.jenkins.GitHubTrigger
GitHubTrigger.GitHubRepositoryNameContributorImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanSet to false to prevent the user from overriding the hook URL. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the file that records the last/current polling activity.Collection<? extends Action>voidonPost()Deprecated.voidonPost(GitHubTriggerEvent event) Called when a POST is made.voidCalled when a POST is made.voidTries to register hook for current associated job.voidvoidstop()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:
onPostin interfaceGitHubTrigger
-
onPost
Called when a POST is made.- Specified by:
onPostin interfaceGitHubTrigger
-
onPost
Called when a POST is made. -
getLogFile
Returns the file that records the last/current polling activity. -
getGitHubRepositories
Description copied from interface:GitHubTriggerObtains 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:
getGitHubRepositoriesin 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:
getProjectActionsin classTrigger<Job<?,?>>
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Trigger<?>>- Overrides:
getDescriptorin classTrigger<Job<?,?>>
-
GitHubRepositoryNameContributor.parseAssociatedNames(AbstractProject)