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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<RepositoryResolver>
all()
abstract org.eclipse.jgit.transport.ReceivePack
createReceivePack
(String fullRepositoryName) ReturnsReceivePack
used to handle "git push" operation from a client.abstract org.eclipse.jgit.transport.UploadPack
createUploadPack
(String fullRepositoryName) ReturnsUploadPack
used to handle "git fetch" operation from a client.
-
Constructor Details
-
RepositoryResolver
public RepositoryResolver()
-
-
Method Details
-
createReceivePack
public abstract org.eclipse.jgit.transport.ReceivePack createReceivePack(String fullRepositoryName) throws IOException, InterruptedException ReturnsReceivePack
used 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
RepositoryResolver
s to get a shot at the repository. - Throws:
IOException
InterruptedException
-
createUploadPack
public abstract org.eclipse.jgit.transport.UploadPack createUploadPack(String fullRepositoryName) throws IOException, InterruptedException ReturnsUploadPack
used 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
RepositoryResolver
s to get a shot at the repository. - Throws:
IOException
InterruptedException
-
all
- Throws:
IllegalStateException
-