Jenkinsfile and different strategies for branches

前端 未结 7 1674
星月不相逢
星月不相逢 2021-01-31 03:23

I\'m trying to use Jenkins file for all our builds in Jenkins, and I have following problem. We basically have 3 kind of builds:

  • pull-request build - it will be me
7条回答
  •  不知归路
    2021-01-31 03:30

    for questions 2 you may be able to do

    sh 'git branch > GIT_BRANCH' def gitBranch = readFile 'GIT_BRANCH'

    since you're checking out from git

提交回复
热议问题