Getting build scripts into workspace. Which is best?

35 views
Skip to first unread message

Trever

unread,
Nov 3, 2016, 3:47:51 PM11/3/16
to Jenkins Users
We have our build scripts in a git repository. Currently we have every one of our pipeline jobs check out the build scripts into the workspace directory in order to run the scripts. This works fine.

While reading through some other Jenkins posts, I see that we could optionally have a job that creates an archive out of the build scripts and our pipeline jobs could copy those scripts from the archived artifacts.

Is one method better than the other? Would there be any benefits to doing it one way over another?

Lee Meador

unread,
Nov 15, 2016, 2:41:10 PM11/15/16
to jenkins...@googlegroups.com
Its the usual things:

* If you have one copy of those scripts and fix something in one of them, all the jobs get the fix.
* If you have one copy of those scripts and break something in one of them, all the jobs get broken.
* you are free to add variations


--
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 jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/deeab827-b48e-44ee-848d-5b7061493220%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Ioannis Moutsatsos

unread,
Nov 21, 2016, 4:22:06 PM11/21/16
to Jenkins Users
If a script is shared among multiple projects and can be used as a build step I usually manage it through the Scriptler (https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin) library.

If a script is unique to a project I place it in a 'buildScripts' sub-folder of the specific Jenkins project and manage it as part of the project configuration.

I'm sure others have come with alternate variations
Reply all
Reply to author
Forward
0 new messages