Git Variables in Jenkins Workflow plugin

前端 未结 7 1514
故里飘歌
故里飘歌 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 04:48

    This example might get you further: https://github.com/jenkinsci/pipeline-examples/tree/master/pipeline-examples/gitcommit

    In this example they are piping the output of git commands to a file, and then reading the file.

提交回复
热议问题