Class GitLabSCMSource
java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.scm.api.SCMSource>
jenkins.scm.api.SCMSource
jenkins.plugins.git.AbstractGitSCMSource
io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource
- All Implemented Interfaces:
ExtensionPoint,Describable<jenkins.scm.api.SCMSource>
public class GitLabSCMSource
extends jenkins.plugins.git.AbstractGitSCMSource
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class jenkins.plugins.git.AbstractGitSCMSource
jenkins.plugins.git.AbstractGitSCMSource.SCMRevisionImpl, jenkins.plugins.git.AbstractGitSCMSource.SpecificRevisionBuildChooserNested classes/interfaces inherited from class jenkins.scm.api.SCMSource
jenkins.scm.api.SCMSource.SourceByItemNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class jenkins.plugins.git.AbstractGitSCMSource
DEFAULT_REMOTE_NAME, REF_SPEC_DEFAULT, REF_SPEC_REMOTE_NAME_PLACEHOLDER, REF_SPEC_REMOTE_NAME_PLACEHOLDER_STRFields inherited from class jenkins.scm.api.SCMSource
PRONOUN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision) protected jenkins.scm.api.SCMProbecreateProbe(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision) com.cloudbees.plugins.credentials.common.StandardCredentialsprotected org.gitlab4j.api.models.ProjectSeegetGitlabProject(GitLabApi).
This method uses this object's pre-configuredSCMSource.getOwner()andserverNameto build the GitLab API endpoint that will be used.protected org.gitlab4j.api.models.ProjectgetGitlabProject(org.gitlab4j.api.GitLabApi gitLabApi) Returns the configuration of the corresponding GitLab project.List<jenkins.scm.api.trait.SCMSourceTrait> jenkins.scm.api.SCMRevisiongetTrustedRevision(jenkins.scm.api.SCMRevision revision, TaskListener listener) protected jenkins.scm.api.SCMRevisionretrieve(String thingName, TaskListener listener) protected jenkins.scm.api.SCMRevisionretrieve(jenkins.scm.api.SCMHead head, TaskListener listener) protected voidretrieve(jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer, jenkins.scm.api.SCMHeadEvent<?> event, TaskListener listener) retrieveActions(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMHeadEvent event, TaskListener listener) retrieveActions(jenkins.scm.api.SCMRevision revision, jenkins.scm.api.SCMHeadEvent event, TaskListener listener) retrieveActions(jenkins.scm.api.SCMSourceEvent event, TaskListener listener) retrieveRevisions(TaskListener listener) voidsetCredentialsId(String credentialsId) voidsetHttpRemote(String httpRemote) voidsetLastRetrieveTimestamp(Long lastRetrieveTimestamp) voidsetProjectId(Long projectId) voidsetProjectName(String projectName) Only used for saving project name forGitLabSCMNavigatorvoidsetSshRemote(String sshRemote) voidMethods inherited from class jenkins.plugins.git.AbstractGitSCMSource
decorate, getBrowser, getCacheDir, getCacheDir, getCacheEntry, getCacheLock, getCredentials, getExcludes, getExtensions, getGitTool, getIncludes, getRefSpecs, getRemoteConfigs, getRemoteName, isCategoryEnabled, isExcluded, isFIPSCompliantTLS, newBuilder, resolveGitTool, resolveGitTool, resolveGitTool, retrieve, retrieveRevisionsMethods inherited from class jenkins.scm.api.SCMSource
build, canProbe, checkInterrupt, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getDescriptor, getId, getOwner, getPronoun, hashCode, hasId, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, setId, setOwner, toString, withId
-
Field Details
-
LOGGER
-
-
Constructor Details
-
GitLabSCMSource
-
-
Method Details
-
getServerName
-
getProjectOwner
-
getProjectPath
-
getHttpRemote
-
setHttpRemote
-
getSshRemote
-
setSshRemote
-
getLastRetrieveTimestamp
-
setLastRetrieveTimestamp
-
getProjectName
-
setProjectName
Only used for saving project name forGitLabSCMNavigator- Parameters:
projectName- the name of the project
-
getCredentialsId
- Specified by:
getCredentialsIdin classjenkins.plugins.git.AbstractGitSCMSource
-
setCredentialsId
-
getRemote
- Specified by:
getRemotein classjenkins.plugins.git.AbstractGitSCMSource
-
getGitlabProject
protected org.gitlab4j.api.models.Project getGitlabProject() throws org.gitlab4j.api.GitLabApiExceptionSeegetGitlabProject(GitLabApi).
This method uses this object's pre-configuredSCMSource.getOwner()andserverNameto build the GitLab API endpoint that will be used.- Throws:
org.gitlab4j.api.GitLabApiException- See Also:
-
getGitlabProject
protected org.gitlab4j.api.models.Project getGitlabProject(org.gitlab4j.api.GitLabApi gitLabApi) throws org.gitlab4j.api.GitLabApiException Returns the configuration of the corresponding GitLab project. As a side-effect, fills in thesshRemote,httpRemoteandprojectIdfields.
Note that if any error occurs when communicating with the GitLab API, the fields mentioned above may be left empty. Only if this method returns successfully can they be guaranteed to be filled in.- Parameters:
gitLabApi- The reference to the GitLab API server.- Returns:
- The GitLab Project representing this object, as pointed at by the
projectPath. - Throws:
org.gitlab4j.api.GitLabApiException- When any exception occurs while communicating with a GitLab API endpoint.
-
getMembers
-
getProjectId
-
setProjectId
-
getTraits
- Overrides:
getTraitsin classjenkins.plugins.git.AbstractGitSCMSource
-
setTraits
- Overrides:
setTraitsin classjenkins.scm.api.SCMSource
-
retrieve
protected jenkins.scm.api.SCMRevision retrieve(@NonNull jenkins.scm.api.SCMHead head, @NonNull TaskListener listener) throws IOException - Overrides:
retrievein classjenkins.plugins.git.AbstractGitSCMSource- Throws:
IOException
-
retrieve
protected void retrieve(jenkins.scm.api.SCMSourceCriteria criteria, @NonNull jenkins.scm.api.SCMHeadObserver observer, jenkins.scm.api.SCMHeadEvent<?> event, @NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
retrievein classjenkins.plugins.git.AbstractGitSCMSource- Throws:
IOExceptionInterruptedException
-
retrieve
protected jenkins.scm.api.SCMRevision retrieve(@NonNull String thingName, @NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
retrievein classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
retrieveRevisions
@NonNull protected Set<String> retrieveRevisions(@NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
retrieveRevisionsin classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
retrieveActions
@NonNull protected List<Action> retrieveActions(jenkins.scm.api.SCMSourceEvent event, @NonNull TaskListener listener) throws IOException - Overrides:
retrieveActionsin classjenkins.plugins.git.AbstractGitSCMSource- Throws:
IOException
-
retrieveActions
@NonNull protected List<Action> retrieveActions(@NonNull jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMHeadEvent event, @NonNull TaskListener listener) throws IOException - Overrides:
retrieveActionsin classjenkins.plugins.git.AbstractGitSCMSource- Throws:
IOException
-
build
@NonNull public SCM build(@NonNull jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision) - Overrides:
buildin classjenkins.plugins.git.AbstractGitSCMSource
-
getTrustedRevision
@NonNull public jenkins.scm.api.SCMRevision getTrustedRevision(@NonNull jenkins.scm.api.SCMRevision revision, @NonNull TaskListener listener) - Overrides:
getTrustedRevisionin classjenkins.scm.api.SCMSource
-
retrieveActions
@NonNull protected List<Action> retrieveActions(@NonNull jenkins.scm.api.SCMRevision revision, jenkins.scm.api.SCMHeadEvent event, @NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
retrieveActionsin classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
createProbe
@NonNull protected jenkins.scm.api.SCMProbe createProbe(@NonNull jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision) throws IOException - Overrides:
createProbein classjenkins.scm.api.SCMSource- Throws:
IOException
-
afterSave
public void afterSave()- Overrides:
afterSavein classjenkins.scm.api.SCMSource
-
credentials
public com.cloudbees.plugins.credentials.common.StandardCredentials credentials()
-