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
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
workspace
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
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) static File
Get the root of theWorkflowLibRepository
git repository on the controller.Methods inherited from class org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
createReceivePack, createUploadPack, openRepository, updateWorkspace
Methods inherited from class org.jenkinsci.plugins.gitserver.HttpGitRepository
checkPullPermission, createReceivePack, createUploadPack, doDynamic, init
-
Constructor Details
-
WorkflowLibRepository
public WorkflowLibRepository()
-
-
Method Details
-
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
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
createInitialRepository
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
-