Github-plugin for Jenkins get committer and author name

后端 未结 4 1572
失恋的感觉
失恋的感觉 2021-01-18 09:53

If I understand well, git plugin exposes committer and author names and emails to environmental variables GIT_AUTHOR_NAME, GIT_COMMITTER_NAME,

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-18 10:38

    You can use this workaround in your scripted pipeline file:

    env.GIT_COMMITTER_EMAIL = sh(
       script: "git --no-pager show -s --format='%ae'",
       returnStdout: true
    ).trim()
    

提交回复
热议问题