Thanks for the reply, I can see the documentation talking about
GIT_COMMITTER_NAME and GIT_AUTHOR_NAME. Might seem a silly question
but how should I be accessing these environment variables from a
Jenkinsfile?
As I can echo BUILD_ID but not GIT_COMMITTER_NAME, e.g.
sh ' echo "BUILD_ID=${BUILD_ID}"'
give me;
[Pipeline] sh
+ echo BUILD_ID=22
BUILD_ID=22
but;
sh ' echo "GIT_COMMITTER_NAME=${GIT_COMMITTER_NAME}"'
give me;
[Pipeline] sh (hide)
+ echo GIT_COMMITTER_NAME=
GIT_COMMITTER_NAME=
I've tried ${env.GIT_COMMITTER_NAME} but that give "bad substitution"
I've tried;
sh ' echo "GIT_COMMITTER_NAME="' + GIT_COMMITTER_NAME
But that gives;
[Pipeline] End of Pipeline
groovy.lang.MissingPropertyException: No such property:
GIT_COMMITTER_NAME for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
Do I have to wait for another jenkins release as your reply implied I
didn't as it was just a documentation issue and I was using the
wrong...
Or am I simply using the wrong syntax to access these environment
variables or missed some setup for the Jenkinsfile.
cheers,
John
>
> Mark Waite
>
>
> --
> 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-use...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGUPhbQd0O%3D%2B9TYU-Vy5jr7QqquMQWu2vorgX15MG8kjw%40mail.gmail.com.