我正在处理詹金斯的工作流程。我的项目包括另一个我想使用稀疏结帐功能的大项目。到目前为止,我发现了几个问题:
(1) 我不知道如何将 repo 克隆到新目录中
git url:'https://some.git.server/project.git', param1:'value1',...
(2) 在上面的项目里面执行一个稀疏的checkout
我找不到任何时髦的语法规范。
下面是我想用 groovy 做的脚本版本
git clone https://some.git.server/project.git
cd project/subdir
git init
git remote add -f origin https://some.git.server/another.project.git
echo Source/Base > .git\info\parse-checkout
echo Source/Core > .git\info\parse-checkout
git pull origin master
...
提前致谢。