Setting up pipeline assembly in Jenkins (Jenkins 2.6), copying a sample script for assembly with git gives: "no tool named MSBuild was found." I installed the MSBuild tool in Manage Jenkins -> Global Tool Configuration. I run the pipeline on the node slave.
In the Slave configuration, I set the path to MSBuild's tool Node Properties -> Tool Locations.
During the build process, it cannot get the path to the MSBuild tool, if I run the same source without a pipeline (without using Jenkinsfile), it works fine.
See Jenkinsfile File Syntax
pipeline {
agent { label 'win-slave-node' }
stages {
stage('build') {
steps {
bat "\"${tool 'MSBuild'}\" SimpleWindowsProject.sln /t:Rebuild /p:Configuration=Release"
}
}
}
}
slave Windows, .
. MS Build node