'Niksan' via Jenkins Users (2016-05-23 14:15):
I'm wanting to create a temporary batchfile on a Jenkins slave via groovy similar to the way Jenkins itself does when invoking a Windows batch file.

cmd /c call C:\Windows\TEMP\hudson6180922768700485046.bat

How do I go about doing that via groovy in Jenkins?

You can use build variables (e.g. BUILD_TAG or even just BUILD_NUMBER) to create a unique file name for a build. Depends on your use case.

See this for a list of all variables.
https://[your.jenkins.domain]/env-vars.html/

Regards,
Nux.

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/48bd5ff8-c759-a639-07f8-eacfbc1480ab%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to