如何让 hudson 的 git 插件使用路径中的存储库名称来克隆存储库?

发布于 2024-12-06 04:49:25 字数 508 浏览 1 评论 0原文

假设我有一个名为“stuff”的存储库。 [email protected]:mine/stuff.git

当我进行 git 克隆时从命令行启动此存储库,它会创建一个名为“stuff”的目录并将所有内容放入其中目录。

当我设置 hudson 使用 git 时,它将所有内容都放在目录中,

$hudson_home/jobs/myjob/workspace/*

工作区后面没有“东西”。只是东西里面的物品。

如何让 hudson 像命令行一样克隆存储库,即:

$hudson_home/jobs/myjob/workspace/stuff/*

我没有看到此选项,并且我不想更改默认工作区路径。

Let's say I have a repo called "stuff". [email protected]:mine/stuff.git

when I do a git clone of this repo from the command line, it creates a directory called "stuff" and puts everything in that directory.

When I set up hudson to use git, it puts everything in the directory

$hudson_home/jobs/myjob/workspace/*

with no "stuff" after workspace. Just the items inside of stuff.

How can I make hudson clone the repo like the commandline does, namely:

$hudson_home/jobs/myjob/workspace/stuff/*

I see no options for this and I do not want to change the default workspace path.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唠甜嗑 2024-12-13 04:49:25

我不知道 Hudson 中是否有此功能,因为我已经升级到 Jenkins

但是,如果您单击 Git 部分底部的“高级”(有两个“高级”按钮),就会有一个名为“Repo 的本地子目录”的属性,它可以满足您的需求。

I don't know whether this feature is in Hudson, since I have upgraded to Jenkins.

But if you click "Advanced" at the bottom of the Git section (there are two "Advanced" buttons), there is a property called "Local subdirectory for repo" which does what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文