- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我已经为 Unix Jenkins 主机设置了一个 Windows Jenkins 从机。我正在运行带有 msysgit 1.9.5 和 Jenkins 1.616 的 Windows 8.1。
当 check out 路径/文件名超过 255 个字符的存储库时,我收到“文件名太长”错误。这是 solved通过在 git 设置中将 core.longpaths
设置为 true。然而,Windows Jenkins 从属忽略自定义设置并使用标准设置。
我尝试过的
在全局、系统、本地设置的 Windows Jenkins 从站上设置 core.longpaths
:
git config --global core.longpaths true
git config --system core.longpaths true
git config --local core.longpaths true
在 Unix Jenkins Master 上设置 core.longpaths
结果
Windows Jenkins slave 仍在使用默认设置运行 git。我用
做了一个简单的构建任务"C:\Program Files (x86)\Git\bin\git.exe" config -l
产生
Started by user mles
[EnvInject] - Loading node environment variables.
Building remotely on jw10 in workspace D:\workspace\windowstesting
[windowstesting] $ sh -xe C:\WINDOWS\TEMP\hudson2817786906482449008.sh
+ 'C:\Program Files (x86)\Git\bin\git.exe' config -l
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
Finished: SUCCESS
注意没有 core.longpaths=true
。在 Windows Jenkins slave 上设置了 core.longpaths=true
C:\Users\jw>git config -l
core.symlinks=false
core.autocrlf=true
core.longpaths=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
什么有效
在没有 Jenkins 的情况下 本地 在 Windows Jenkins 从服务器上克隆具有很长路径/文件名的存储库。
什么不起作用
在 Windows Jenkins 从服务器上用很长的路径/文件名克隆同一个存储库用 Jenkins
Started by user mles
[EnvInject] - Loading node environment variables.
Building remotely on jw10 in workspace D:\workspace\windowstesting
Cloning the remote Git repository
Cloning repository https://github.com/axelhodler/longfile.git
> git init D:\workspace\windowstesting # timeout=10
Fetching upstream changes from https://github.com/axelhodler/longfile.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress https://github.com/axelhodler/longfile.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url https://github.com/axelhodler/longfile.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/axelhodler/longfile.git # timeout=10
Fetching upstream changes from https://github.com/axelhodler/longfile.git
> git -c core.askpass=true fetch --tags --progress https://github.com/axelhodler/longfile.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
> git rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision 31b408748324aa6f361828e45ae1d374c3f0fc25 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 31b408748324aa6f361828e45ae1d374c3f0fc25
FATAL: Could not checkout null with start point 31b408748324aa6f361828e45ae1d374c3f0fc25
hudson.plugins.git.GitException: Could not checkout null with start point 31b408748324aa6f361828e45ae1d374c3f0fc25
...
Caused by: hudson.plugins.git.GitException: Command "git checkout -f 31b408748324aa6f361828e45ae1d374c3f0fc25" returned status code 128:
stdout:
stderr: fatal: cannot create directory at 'launchpad/projects/configurationAdminManager/gofer-configurationAdminManager-notification/src/com/mwaysolutions/gofer2/configurationAdminManager/notification/dummydummy/dummydummy/dummydummy/dummydummy/dummydummy/dummydummy': Filename too long
....
Finished: FAILURE
我不能在开始时添加另一个构建步骤来设置 core.longpaths
,因为检查存储库是 jenkins 在运行任何构建步骤之前要做的第一件事。
知道为什么我的 Windows Jenkins slave 忽略了自定义设置吗?
最佳答案
无需更改运行 Jenkins 从站的用户,您可以直接对其进行配置。
添加脚本(类似)
cd c:\dev-software\git-2.7.1\bin
git config --global core.longpaths true
git config --system core.longpaths true
git config --local core.longpaths true
echo %USERPROFILE%\.gitconfig on %COMPUTERNAME%
type %USERPROFILE%\.gitconfig
当它运行时,它应该更新从站的配置,无论他们以谁的身份运行
关于windows - Jenkins Windows Slave 忽略本地 Git 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31812969/
我想创建一个 Jenkins 工作来启动其他 Jenkins 工作。这很容易,因为 Jenkins 模板项目插件允许我们创建“使用另一个项目的构建器”类型的构建步骤。然而,让我的情况更难的是我必须在其
我有一个简单的Windows批处理命令(robocopy),该命令返回零错误,但在Jenkins中始终被标记为失败。我想知道为什么? D:\ Jenkins \ jobs \ Jenkins Conf
我有两个 Jenkins 工作 - Jenkins Job1 和 Jenkins Job2。 我有多个应用程序并使用相同的 Jenkins 来构建应用程序。如果相同的应用程序在 Jenkins 中运行
我找不到这两者之间的区别。这些是相同的还是不同的。 最佳答案 第一个区别是支持(正如其他人所提到的)。 CloudBees 提供企业级支持以及经过全面审查和测试的 Jenkins 版本,该版本将在各种
是否可以指定在多次触发作业(A)的情况下,将先前的作业从队列中删除,并且如果有足够的可用插槽,则仅将最新的作业留在队列中或启动? 提前致谢! 最佳答案 您可以使用通过Groovy Script Plu
我有2位Jenkins主持人,并且希望First Jenkins在第一个结果的基础上基于“SUCCESS”触发远程Jenkins上的工作。 我看过各种插件,但它们似乎都表明一个Jenkins主机,可以
我的 jenkinsfile 有几个参数,每次我更新参数(例如删除或添加新输入)并将更改提交到我的 SCM 时,我没有在 jenkins 中看到相应更新的作业输入屏幕,我必须运行执行,取消它,然后查看
有没有办法在构建完成后触发相同的工作。我有一项工作需要运行,直到我手动中止它。有没有办法做到这一点? 最佳答案 最简单的方法是添加一个构建相同项目的后期构建步骤。将“构建后操作”-“构建其他项目”-“
我在 Linux 家中的特定用户下有工作/.jenkins 文件夹。我想与另一个用户一起启动 Jenkins,但重新使用另一个用户的 .jenkins 文件夹。我怎样才能做到这一点? Jenkins
我是 Jenkins 的新手,我不确定这是否可行,但我想设置一个 Web 界面,人们可以在其中单击“开始作业”,这将告诉 Jenkins 开始特定的构建作业。 Jenkins 是否有允许此类操作的网络
如何获取 Jenkins 凭证变量,即“mysqlpassword”,可供 Jenkins 声明性管道的所有阶段访问? 下面的代码片段工作正常并打印我的凭据。 node { stage('Gett
如何获取 Jenkins 凭证变量,即“mysqlpassword”,可供 Jenkins 声明性管道的所有阶段访问? 下面的代码片段工作正常并打印我的凭据。 node { stage('Gett
如何将构建参数从一个项目传递到另一个项目? 我们在 Jenkins 用户界面中是否有任何配置,可以在完成一个构建项目后将构建参数传递给另一个项目? 我能够触发另一个项目,但无法传递构建参数。我们是否有
我正在 Jenkins 中构建一个项目,并希望在它之后立即启动测试,请稍候 直到测试完成,然后运行另一个作业来分析结果。测试系统是一个封闭的系统(我不能修改它)所以为了检查测试是否完成我需要每 X 秒
我创建了一个测试 jenkins 作业管道。此作业具有字符串参数 - 'testVar' Jenkins文件代码: println("env.TESTVAR=" + env.TESTVAR) prin
我的 Jenkins 工作“构建”配置有 3 执行 shell - 构建任务 2 构建后操作 有没有办法获取每个构建任务和构建后操作的运行时间? 最佳答案 不直接,这就是为什么: 我使用 a Jenk
是否有任何适用于 Jenkins 的插件可以为 Jenkins 提供键值存储选项?功能接近的插件是凭据插件。目标是拥有一个存储全局配置参数的插件,并且此参数可用于 Jenkins 作业。 最佳答案 转
默认情况下,Jenkins 是否会保留每个构建中生成的所有构建和工件。或者它会在一段时间后删除它们。我知道我可以配置“丢弃旧版本”选项,但我想知道 Jenkins 的默认行为。 最佳答案 默认是保留所
Jenkins 构建中的每个文件参数“帮助文本”, Accepts a file submission from a browser as a build parameter. The uploade
情况:我在我的虚拟服务器上安装了 Jenkins 并设置了一个“自由式管道”。我通过 webhook push 将它连接到我的 github,它可以工作(当我推送到存储库时,在 jenkins 中启动
我是一名优秀的程序员,十分优秀!