Jenkins Git plugin detached HEAD

后端 未结 9 2054
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 09:55

I am new to Git and also to Jenkins. My problem is that I can\'t get the Jenkins Maven release plugin to work.

When I build a common Maven build with Jenkins, it wor

9条回答
  •  抹茶落季
    2020-12-02 10:20

    (SOLVED)

    Hi, I had the same issue when trying to do a parametrized release build from a branch with maven-release-plugin:2.5.3 and maven-scm-provider-jgit:1.9.5.

    I wanted to be able to select the branch for the "parametrized release build" this did not work and when I chose "Checkout/merge to local branch (optional)" it worked but ended up with a branch "origin/origin/mybranch" in remote (repeated origin).

    So:

    • Add "Git Parameter" to "This project is parameterized"
      Name: branch
      ParameterType: Branch
      Click Advanced:
      Branch Filter:origin/(.*)
      (this was the trick!)

    • Git Repository:
      Branches to build: refs/remotes/origin/${branch}

    • Additional Behaviors: -> Check out to specific local branch
      Branch Name: ${branch}

    Have fun :-)

提交回复
热议问题