Groovy Plugin: TriggeredBy & MSBuild
Hi,
I need the current username of the author who triggered the current build on TC 7 (from a Mercurial repo). Using Groovy (v7.0-8 it is installed!), in my MS build script, I have this:
<Message Text="Build Start: $(build_start_date)" />
<Message Text="Current User: $(build_triggeredBy)" />
<Message Text="Current User: $(build_triggeredBy_username)" />
...however, looking at the build log, nothing gets substituted for the triggeredby values. I get this output;
[Build] Build Start: 20120612
[Build] Current User:
[Build] Current User:
What am I doing wrong?
Thanks,
Paul
Please sign in to leave a comment.
Hi Paul,
build.triggeredBy is a configuration parameter (no "system." prefix), so it is not passed into the build automatically. You can pass it if you define a new system property with the value %build.triggeredBy%.