Class WorkflowLibRepository

    • Constructor Detail

      • WorkflowLibRepository

        public WorkflowLibRepository()
    • Method Detail

      • workspace

        public static File workspace()
        Get the root of the WorkflowLibRepository git repository on the controller. To use the repository for things other than UserDefinedGlobalVariables, call this to get the repository, and extend WorkflowLibRepositoryListener 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 the WorkflowLibRepository git repository on the controller.
      • checkPushPermission

        protected void checkPushPermission()
        Specified by:
        checkPushPermission in class org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
      • 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 class org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository
        Throws:
        IOException
      • createReceivePack

        public org.eclipse.jgit.transport.ReceivePack createReceivePack​(org.eclipse.jgit.lib.Repository db)
        Overrides:
        createReceivePack in class org.jenkinsci.plugins.gitserver.FileBackedHttpGitRepository