File creation on agent machine
Hello,
I am planning to move a Jenkins pipeline to agent machine.
I used, def file = new File("C:\\Sharan\\ABC.template")
to create template file on master machine, this code doesn't work on agent machine. How can i create the above template file on windows agent machine?
Thanks in advance,
Sharan
0
-
Hi Sharan,
Please check out the writeFile option in Pipeline https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#writefile-write-file-to-workspace
This will let you create a file in a workspace based on some string contents and then manipulate it using regular shell commands.
0
Please sign in to leave a comment.
Comments
1 comment