简体   繁体   English

如何使用 Subversion 设置 Jenkins 共享库

[英]How to setup Jenkins shared library with Subversion

Every example I've seen for Jenkins shared library setup on the web is based on Git/GitHub.我在 web 上看到的 Jenkins 共享库设置的每个示例都基于 Git/GitHub。 Can anyone help me with that using Subversion?任何人都可以使用 Subversion 帮助我吗?
I've struggled a lot but could not figure out what should be specified as the Default version .我挣扎了很多,但无法弄清楚应该将什么指定为Default version I've tried many different combinations of Project Repository Base , Include branches , Library Name and Default version but none worked.我尝试了Project Repository BaseInclude branchesLibrary NameDefault version的许多不同组合,但没有一个有效。

Attached is the screenshot of my SVN repository setup.附件是我的 SVN 存储库设置的屏幕截图。 I know it's not as per the standards though, it should work somehow as it's just a demo project.我知道它不符合标准,它应该以某种方式工作,因为它只是一个演示项目。

在此处输入图像描述

if your lib svn path is https://192.168.1.1:8443/svn/trunk/JenkinsLib , then Project Repository Base will be https://192.168.1.1:8443/svn/trunk/ and Default version is JenkinsLib. if your lib svn path is https://192.168.1.1:8443/svn/trunk/JenkinsLib , then Project Repository Base will be https://192.168.1.1:8443/svn/trunk/ and Default version is JenkinsLib.

While setting up the shared library in Configure System --> Global Pipeline libraries select Retrival Methond: Morden SCM and Source Code Management: Subversion like below picture:Configure System --> Global Pipeline libraries select Retrival Methond: Morden SCM and Source Code Management: Subversion中设置共享库时,如下图: 在此处输入图像描述

and When you select Subversion it will ask you to choose subversion specific branching name like below:当您 select Subversion 时,它会要求您选择特定于 subversion 的分支名称,如下所示: 在此处输入图像描述

I didn't want to tag a specific branch in SVN, so I just used a period (ie '.') in the DEFAULT VERSION field and that takes that HEAD of the repo.我不想在 SVN 中标记一个特定的分支,所以我只是在 DEFAULT VERSION 字段中使用了一个句点(即“.”),这就是回购的 HEAD。

The project repo base is just the svn:// path to your repo.项目 repo 库只是你的 repo 的 svn:// 路径。

I hope that helps.我希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM