I haven't,
But the code would look something like the following:
import hudson.model.*
import org.acegisecurity.context.SecurityContextHolder
CauseAction action = build.getAction(CauseAction.class)
if (action != null) build.getActions().remove(action)
//This is the tricky part
def oldAuth = SecurityContextHolder.getContext().getAuthentication()
User otherUser = User.get("username")
SecurityContextHolder.getContext().setAuthentication(otherUser.impersonate())
build.addAction(new CauseAction(new Cause.UserIdCause()))
SecurityContextHolder.getContext().setAuthentication(oldAuth)
But I haven't tested if it works or even compiles ;)
Robert Sandell
Software Tools Engineer - SW Environment and Product Configuration
Sony Mobile Communications
> -----Original Message-----
> From: [email protected] [mailto:jenkinsci-
> [email protected]] On Behalf Of mallikarjunece
> Sent: den 10 juni 2013 07:38
> To: [email protected]
> Subject: RE: Reload build.xml after finishing build
>
> Hi Sandell,
>
> Can you share the Groovy script, if you have
>
> Thanks in advance....
> Mallikarjuna
>
>
>
> --
> View this message in context: http://jenkins-
> ci.361315.n4.nabble.com/Reload-build-xml-after-finishing-build-
> tp4664201p4668880.html
> Sent from the Jenkins dev mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.