Class GitLabHookCreator
java.lang.Object
io.jenkins.plugins.gitlabbranchsource.GitLabHookCreator
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createSystemHookWhenMissing
(GitLabServer server, com.cloudbees.plugins.credentials.common.StandardCredentials credentials) static org.gitlab4j.api.models.ProjectHook
static String
createWebHookWhenMissing
(org.gitlab4j.api.GitLabApi gitLabApi, String project, String hookUrl, String secretToken) static String
getHookUrl
(boolean isWebHook) Deprecated.static String
getHookUrl
(GitLabServer server, boolean isWebHook) static boolean
isTokenEqual
(String str1, String str2) static void
register
(GitLabSCMSource source, GitLabHookRegistration webhookMode, GitLabHookRegistration systemhookMode) static void
register
(jenkins.scm.api.SCMNavigatorOwner owner, GitLabSCMNavigator navigator, GitLabHookRegistration systemhookMode)
-
Field Details
-
LOGGER
-
-
Constructor Details
-
GitLabHookCreator
public GitLabHookCreator()
-
-
Method Details
-
register
public static void register(GitLabSCMSource source, GitLabHookRegistration webhookMode, GitLabHookRegistration systemhookMode) -
createSystemHookWhenMissing
public static void createSystemHookWhenMissing(GitLabServer server, com.cloudbees.plugins.credentials.common.StandardCredentials credentials) -
getHookUrl
Deprecated.usegetHookUrl(GitLabServer,boolean)
instead -
getHookUrl
- Parameters:
server
- theGitLabServer
for which the hooks URL would be created. If notnull
and it has aGitLabServer.getHooksRootUrl()
, then the hook URL will be based on this root URL. Otherwise, the hook URL will be based onJenkins.getRootUrl()
.isWebHook
-true
to get the webhook URL,false
for the systemhook URL- Returns:
- a webhook or systemhook URL
-
createWebHook
public static org.gitlab4j.api.models.ProjectHook createWebHook() -
createWebHookWhenMissing
public static String createWebHookWhenMissing(org.gitlab4j.api.GitLabApi gitLabApi, String project, String hookUrl, String secretToken) throws org.gitlab4j.api.GitLabApiException - Throws:
org.gitlab4j.api.GitLabApiException
-
isTokenEqual
getHookUrl(GitLabServer,boolean)
instead