Jenkins multibranch pipeline Scan without execution

前端 未结 4 2077
不思量自难忘°
不思量自难忘° 2021-02-06 22:04

Is it possible to Scan a Multibranch Pipeline to detect the branches with a Jenkinsfile, but without the pipeline execution?

My projects have different branc

4条回答
  •  时光取名叫无心
    2021-02-06 22:23

    To add to @Stqs's answer, you could also set noTriggerBranchProperty it using Job DSL plugin, e.g.:

    multibranchPipelineJob('example') {
      ...
      branchSources {
        branchSource {
          ...
          strategy {
            defaultBranchPropertyStrategy {
              props {
                // Suppresses the normal SCM commit trigger coming from branch indexing
                noTriggerBranchProperty()
                ...
              }
            }
          }
        }
      }
      ...
    }
    

提交回复
热议问题