Jenkins - 从文件系统而不是 SCM 加载全局管道库? [英] Jenkins - load global pipeline library from filesystem instead of SCM?

查看:24
本文介绍了Jenkins - 从文件系统而不是 SCM 加载全局管道库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文档中找不到有关如何执行此操作的任何内容 - 有人有什么想法吗?

I can't find anything in the docs on how to do this - anybody have any ideas?

推荐答案

目前看来不可能.但是您可以轻松地初始化本地 git 存储库并将其用作 SCM,而无需任何远程托管.
要初始化 git repo,请在共享库的根目录中使用以下命令(例如 C:UsersJenkinspipeline-shared-library-test):

It seems it is currently not possible. But you can easily init a local git repository and use it as SCM without any remote hostings.
To init a git repo use the following commands in the root directory of your shared library (for example C:UsersJenkinspipeline-shared-library-test):

git init
git add .
git commit -m "init"

然后在 Manage Jenkins->Configure System->Global Pipeline Libraries 中,您可以使用文件 URI file 将 Project Repository 指向您的本地 repo:///c:/Users/Jenkins/pipeline-shared-library-test
这种方法对我来说很好.

Then in Manage Jenkins->Configure System->Global Pipeline Libraries you can point Project Repository to you local repo using a file URI file:///c:/Users/Jenkins/pipeline-shared-library-test
This approach works fine for me.

这篇关于Jenkins - 从文件系统而不是 SCM 加载全局管道库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆