在Jenkins(Jenkins 2.6)中设置管道构建,复制基于git的构建的示例脚本给出:“没有找到名为MSBuild的工具”。我已经在Manage Jenkins -> Global Tool Configuration
中设置了MSBuild工具。我在从节点上运行管道。
在从站配置中,我在Node Properties -> Tool Locations
中设置了MSBuild工具路径。
虽然构建过程中无法获取MSBuild工具路径,如果我运行没有管道的同源(不使用Jenkinsfile),它工作正常。
请参阅Jenkinsfile语法Jenkins:找不到名为MSBuild的工具
pipeline {
agent { label 'win-slave-node' }
stages {
stage('build') {
steps {
bat "\"${tool 'MSBuild'}\" SimpleWindowsProject.sln /t:Rebuild /p:Configuration=Release"
}
}
}
}
我也试图改变环境变量的窗户奴隶它不刷新。
注:我已经安装了MS从节点
你检查过控制台上代理其在你建造的时候正在跑步。 –
您可以检查此一次 “节点( '双赢从属节点'){ 高清的MSBuild 的MSBuild =工具 '的MSBuild' 阶段( '构建'){ 蝙蝠(/” $ {的MSBuild}” SimpleWindowsProject。 sln/t:Rebuild/p:Configuration = Release /) } }“ –
上面是相同的代码,稍作修改尝试一次检查是否工作/不是 –