Git environment variables for use in executing Jenkins shell scripts

前端 未结 3 1942
春和景丽
春和景丽 2020-12-16 15:33

Hope someone can help - I have the following plugin installed in my Jenkins instance - but I don\'t seem to be able to get hold of the Git variables below. I need these to c

3条回答
  •  [愿得一人]
    2020-12-16 16:06

    Similarly you could just echo them out:

    echo GIT_COMMIT %GIT_COMMIT% 
    echo GIT_BRANCH %GIT_BRANCH%
    

    Here's a quick Jenkins Git configuration tutorial on the Git environment variables topic that uses the Jenkins Git configuration described in the image.

提交回复
热议问题