我尝试使用 Jenkinsfile 来执行 build.ps1 文件。但是,当我扫描 multibranch-pipeline 时,我看到 Does not meet criteria
日志。为什么 Jenkins 找不到文件。我的仓库地址是 this .
Jenkins 版本:2.138.3
Jenkinsfile 是:
#!groovy
node {
stage ('Checkout') {
checkout scm
}
stage('Check Env Parameters'){
echo "Branch Name : ${env.GIT_BRANCH}"
echo "Octo Server Address : ${env.octoServer}"
}
stage('Run Cake') {
powershell -File build.ps1 -projectName="Jenkins_PowerShell_Cake_Tutorial" -branchName=${env.GIT_BRANCH} -octoServer=${env.octoServer} -octoApiKey=${env.octoApiKey}
}
}
Jenkinsfile 的类型不是 txt
詹金日志:
最佳答案
存储库中的 Jenkinsfile
名为 .Jenkinsfile
(以点作为第一个字符)。重命名文件或使用点配置脚本路径。
关于jenkins - 未找到“Jenkinsfile”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53360054/