Re: Git Commit Message as an Environment Variable

2019-11-19 Thread Daniel Beck
I have a (never released) plugin that integrates with the Jenkins changelog
that does something like this:
https://github.com/daniel-beck/changelog-environment-plugin

If you know enough Maven to build a plugin, this might work. The problem
there is that the Jenkins built-in changelog doesn't handle PRs/branches
well: The first builds always have no changelogs (since there's no
reference to compare them to).

But I expect it's easier and more reliable to just call e.g. git show
--no-patch --format='format:%s%n%n%b' and use its output (with some extra
work to get around merge commits and such, depending on exactly what you
want).

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMo7Pt%2B-mkD_y_R%2Bhe2G%3DOd5CqgyrWfq9tZfZ450nWnedwjbOw%40mail.gmail.com.


Git Commit Message as an Environment Variable

2019-11-19 Thread Jeremy Hartley
Hi,

I'm playing around a bit with Git environment variables to send to slack 
and would like to include the Git commit message. I don't see it available 
in the list here: 
https://wiki.jenkins.io/display/JENKINS/Git+Plugin#GitPlugin-Environmentvariables

Is there any way to send the Git commit message to slackSend as an 
environment variable in my pipeline?

Thanks

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/65afed35-7011-4f3c-84e0-41b196b3a5a3%40googlegroups.com.