0
これは私のJenkinsfileです.JenkinsにはMSBuildプラグインがインストールされています。以下のmsbuildコマンドは、コマンドラインから実行できるので正しいですが、Jenkinsはそれに失敗し続けます。私は、パラメータを削除した場合、それは文句だ、それはなど、次のいずれかに障害が発生した...JenkinsはMSBuildコマンドの実行に失敗します
Jenkinsfile(gitリポジトリに保存されている):
pipeline {
agent {
docker 'node:7.7.3'
}
stages {
stage('Build') {
steps {
bat echo 'Checking node.js version..'
bat echo 'node -v'
bat echo 'Restore nugets..'
bat 'nuget restore mySolution.sln'
bat echo 'Building..'
bat "C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\msbuild.exe" mySolution.sln /noautorsp /ds /nologo /t:clean,rebuild /p:Configuration=Debug /v:m /p:VisualStudioVersion=14.0 /clp:Summary;ErrorsOnly;WarningsOnly /p:ProductVersion=1.0.0.${env.BUILD_NUMBER}
}
}
stage('Test') {
steps {
bat echo 'Testing..'
}
}
stage('Deploy') {
steps {
bat echo 'Deploying....'
}
}
}
post {
success {
bat echo 'Pipeline Succeeded'
}
failure {
bat echo 'Pipeline Failed'
}
unstable {
bat echo 'Pipeline run marked unstable'
}
}
}
エラー:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 14: expecting '}', found '/' @ line 14, column 84.
\msbuild.exe" mySolution.sln /noautorsp
^
スラッシュをエスケープする必要があります。行14の完全なコマンドの回りに一重引用符を入れてみることはできますか?このように:bat 'command' –
同じ問題があります。 – Ninos