我开始创建我的管道multibranch环境,但我已经找到了一个问题.
我是否可以仅使用Jenkins文件检测分支但没有管道执行的情况下运行构建扫描?
我的项目有不同的分支,我不想要当我从父管道multibranch启动构建扫描所有子管道foreach分支与Jenkinsfile开始执行.
谢谢你的帮助!
我正在尝试使用并行步骤进行后故障操作,但它永远不会起作用.
这是我的JenkinsFile:
pipeline {
agent any
stages {
stage("test") {
steps {
withMaven(
maven: 'maven3', // Maven installation declared in the Jenkins "Global Tool Configuration"
mavenSettingsConfig: 'maven_id', // Maven settings.xml file defined with the Jenkins Config File Provider Plugin
mavenLocalRepo: '.repository')
{
// Run the maven build
sh "mvn --batch-mode release:prepare -Dmaven.deploy.skip=true" --> it will always fail
}
}
}
stage("testing") {
steps {
parallel (
phase1: { sh 'echo phase1' },
phase2: { sh "echo phase2" }
)
} …Run Code Online (Sandbox Code Playgroud)