【发布时间】:2016-09-12 01:31:31
【问题描述】:
我在使用 tfs-unlock 的 npm 包时遇到问题(我正在使用 grunt)
这是我在尝试构建时从服务器收到的消息。
[exec] [4mRunning "tfs-unlock:checkout" (tfs-unlock) 任务[24m [exec] [31m>> [39mChild 进程退出,代码 #1。 [exec] [33mWarning:任务“tfs-unlock:checkout”失败。使用 --force 继续。[39m [执行] [exec] [31mAborted 由于警告。[39m
这是任务的配置
'tfs-unlock': {
'checkout': {
'options': {
'tfsPath': ["vs2013", "bit64"],
'action': 'checkout'
},
'files': {
'src': ['js/*.js', 'js/*.min.js', 'css/*.css']
}
}
}
有没有人用过,遇到过这个问题?如果是这样,为什么会出现此错误?如何使它工作? 谢谢你
PS:本地工作完美,它不会抱怨任何事情。 我正在使用 Jenkins 和 Octopus 进行自动构建和部署。
当 Jenkins 构建时,应该应用更改(这是“tfs-unlock:checkout”失败的步骤,表明“checkout child”不存在,当它明显存在时,这如何在本地正确地工作?)
我在代理后面工作,但为了处理这个问题,我使用了 Ant 步骤所针对的这个文件
my.xml 配置
<target name="build" description="generate files with grunt">
<exec executable="cmd" dir="./" failonerror="true">
<arg value="/C" />
<arg value="npm"/>
<arg value="config"/>
<arg value="set"/>
<arg value="proxy"/>
<arg value="http://my_Address/"/>
<arg value="--global"/>
</exec>
<echo message="Installing Deps ..." />
<exec executable="cmd" dir="./" failonerror="true">
<arg value="/C" />
<arg value="npm"/>
<arg value="install"/>
</exec>
<echo message="generate files..." />
<exec executable="cmd" dir="./" failonerror="true">
<arg value="/C" />
<arg value=".\node_modules\.bin\grunt" />
</exec>
<echo message="Done" />
</target>
【问题讨论】:
-
显然是 TF.exe 的封装;你能交出原来的命令行吗?也许您正在使用服务器工作区并且文件被另一个用户锁定
标签: c# node.js jenkins tfs npm