-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
We often need to do decision making on base of commit message like if commit message contains WIP so build process should not start.
[JENKINS-52490] Plugin should provide GIT_COMMIT_MESSAGE as Environment Variable
Assignee | Original: Mark Waite [ markewaite ] |
Summary | Original: Plugin should provide GIT_COMMITTER_MESSAGE as Enviornment Variable | New: Plugin should provide GIT_COMMIT_MESSAGE as Environment Variable |
Summary | Original: Plugin should provide GIT_COMMIT_MESSAGE as Environment Variable | New: Plugin should provide GIT_COMMITTER_MESSAGE as Environment Variable |
Summary | Original: Plugin should provide GIT_COMMITTER_MESSAGE as Environment Variable | New: Plugin should provide GIT_COMMIT_MESSAGE as Environment Variable |
This is already available for Pipeline jobs by using the GIT_COMMIT (sha1 of the commit) value returned in the map of the checkout step. Use that SHA1 to call a shell step and read the commit message into your Pipeline.
If that same information is needed in a Freestyle project, you'll need to use a similar technique from within the build script.