Git Variables in Jenkins Workflow plugin

前端 未结 7 1496
故里飘歌
故里飘歌 2020-12-08 04:17

I\'d like to access git variables such as GIT_COMMIT and GIT_BRANCH when I have checked out a repository from git further down in the build stream.

相关标签:
7条回答
  • 2020-12-08 05:03

    I good way to fix this for now is to use the Multi-branch pipeline, and it might be good to know that Bitbucket and Github have plugins in Jenkins that sets up an organisation and autodiscovers new projects. This works natively then with env.GIT_BRANCH

    For commit ID I would suggest what @mkobit wrote above.

    0 讨论(0)
提交回复
热议问题