Class WorkflowLibRepository
- java.lang.Object
-
- org.jenkinsci.plugins.gitserver.HttpGitRepository
-
- org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
-
- org.jenkinsci.plugins.workflow.cps.global.WorkflowLibRepository
-
- All Implemented Interfaces:
ExtensionPoint
,Action
,ModelObject
,RootAction
@Extension public class WorkflowLibRepository extends org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository implements RootAction
Exposes the workflow libs as a git repository over HTTP.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description WorkflowLibRepository()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkPushPermission()
protected void
createInitialRepository(org.eclipse.jgit.lib.Repository r)
Starts a new repository without initial import, since this directory was never unmanaged.org.eclipse.jgit.transport.ReceivePack
createReceivePack(org.eclipse.jgit.lib.Repository db)
String
getDisplayName()
String
getIconFileName()
String
getUrlName()
static File
workspace()
Get the root of theWorkflowLibRepository
git repository on the controller.
-
-
-
Method Detail
-
workspace
public static File workspace()
Get the root of theWorkflowLibRepository
git repository on the controller. To use the repository for things other thanUserDefinedGlobalVariable
s, call this to get the repository, and extendWorkflowLibRepositoryListener
to listen for pushes to the repository in order to respond to those pushes by rebuilding stored classes/scripts, etc.- Returns:
- A
File
pointing to theWorkflowLibRepository
git repository on the controller.
-
checkPushPermission
protected void checkPushPermission()
- Specified by:
checkPushPermission
in classorg.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
createInitialRepository
protected void createInitialRepository(org.eclipse.jgit.lib.Repository r) throws IOException
Starts a new repository without initial import, since this directory was never unmanaged. This will create a nice empty repo that people can push into, as opposed to one they have to pull from. This prevents a user mistake like JENKINS-25632.- Overrides:
createInitialRepository
in classorg.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
- Throws:
IOException
-
createReceivePack
public org.eclipse.jgit.transport.ReceivePack createReceivePack(org.eclipse.jgit.lib.Repository db)
- Overrides:
createReceivePack
in classorg.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
-
-