Class RepositoryResolver
- All Implemented Interfaces:
ExtensionPoint
Repository.
This extension point allows multiple plugins to expose their Git repositories via SSH/Git protocol.
Repository Name
Both methods of this interface uses the parameter 'fullRepositoryName'.
This parameter represents the repository path name as given by git client. For example, "foo/bar.git" for client running "git push jenkins:foo/bar.git" and "/foo/bar.git" for client running "git push ssh://jenkins/foo/bar.git".
To avoid conflicts, plugins are highly encouraged to require a known prefix. For example, if you are implementing acme-plugin, you should only recognize "acme/foo.git" or "acme/foo/bar.git" but not "foo.git"
Similarly, because of the difference in the way the leading '/' appears based on the protocol, most implementations should support both "/acme/foo.git" and "acme/foo.git".
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<RepositoryResolver>all()abstract org.eclipse.jgit.transport.ReceivePackcreateReceivePack(String fullRepositoryName) ReturnsReceivePackused to handle "git push" operation from a client.abstract org.eclipse.jgit.transport.UploadPackcreateUploadPack(String fullRepositoryName) ReturnsUploadPackused to handle "git fetch" operation from a client.
-
Constructor Details
-
RepositoryResolver
public RepositoryResolver()
-
-
Method Details
-
createReceivePack
@CheckForNull public abstract org.eclipse.jgit.transport.ReceivePack createReceivePack(String fullRepositoryName) throws IOException, InterruptedException ReturnsReceivePackused to handle "git push" operation from a client.- Parameters:
fullRepositoryName- The repository path name as given by git client. See class javadoc for details.- Returns:
- null if this resolver doesn't recognize the given path name.
This will allow other
RepositoryResolvers to get a shot at the repository. - Throws:
IOExceptionInterruptedException
-
createUploadPack
@CheckForNull public abstract org.eclipse.jgit.transport.UploadPack createUploadPack(String fullRepositoryName) throws IOException, InterruptedException ReturnsUploadPackused to handle "git fetch" operation from a client.- Parameters:
fullRepositoryName- The repository path name as given by git client. See class javadoc for details.- Returns:
- null if this resolver doesn't recognize the given path name.
This will allow other
RepositoryResolvers to get a shot at the repository. - Throws:
IOExceptionInterruptedException
-
all
- Throws:
IllegalStateException
-