如何获取hudson的git插件以使用路径中的存储库名称克隆存储库? [英] How to get hudson's git plugin to clone repo with the name of the repo in the path?

查看:98
本文介绍了如何获取hudson的git插件以使用路径中的存储库名称克隆存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个名为"stuff"的仓库. git@github.com:mine/stuff.git

Let's say I have a repo called "stuff". git@github.com:mine/stuff.git

当我从命令行对该仓库进行git克隆时,它将创建一个名为"stuff"的目录,并将所有内容放入该目录中.

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.

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

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.

我如何使hudson像命令行一样克隆仓库,即:

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.

推荐答案

我不知道此功能是否在Hudson中,因为我有升级为詹金斯(Jenkins).

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

但是,如果您在Git部分的底部中单击高级"(有两个高级"按钮),则会有一个名为本地子目录供回购"的属性,它可以满足您的需求

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.

这篇关于如何获取hudson的git插件以使用路径中的存储库名称克隆存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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