I have a jenkins job that amongst other things I want to dynamically create a .foo
and a .bar
file in my jenkins workspace home directory as the job is running.
How can I do that with bash as a part of the job?
The job will run after a Docker container has been created with the Docker Plugin.
So the order of precedence I want is :
Job starts:
How can I achieve this?
One simple solution would be to associate your Jenkins job with a source controlled repository URL, which already include the files with the right content.
Each job execution would create a workspace populated with that repo content, and launch your docker container.
If not, you would need to add a script step, like this one in Groovy .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.