Hi, thanks .. this seems to look like this will solve my problem... Will report back if it doesn't
Am Mittwoch, 15. Juni 2016 15:00:36 UTC+2 schrieb Sverre Moe: > > Take a look at Pipeline Global Library > https://github.com/jenkinsci/workflow-cps-global-lib-plugin > I started with the same problem as you now have and solved it by using > global pipeline scripts. > These global script are stored in Jenkins git repository workflowLibs.git > and can be accessed within all pipeline scripts. > > onsdag 15. juni 2016 12.46.26 UTC+2 skrev Christian Ditscher følgende: >> >> Hello, >> >> I use a seperate reopsitory for my pipeline script. Multiple Jenkins Jobs >> use this pipeline script to built different Projects. For better >> maintainability >> the pipeline itself consists of a main script and multiple other sript >> files in which I implemented the different stages. >> The pipelines are started by the built in function of Jenkins to checkout >> a Pipelinescript from SCM. Here I have configured the main pipeline script >> to be run. This main script then uses "load" to start the different stages. >> >> The thing that annoys me is that the "load" command needs to be contained >> inside a node {..} block. This means I have to checkout the script files >> again on a node to "load" it. The scripts are already checked out on the >> master after "loading the script from SCM". I simply want to use the >> Flyweight executor to run the content of the stage script). A bad solution >> would be to have the whole pipeline in one big script file. This would work >> but is really confusing. >> >> Is there a way to tell the main script (which runs on the master) to >> "insert" another groovy file (already present on master)? >> >> Any Ideas? >> >> Thanks >> Chris >> >> >> >> *Note:* >> In the Pipeline documentation I found the following but this still needs >> to checkout the scripts to a new node every time I want to load something. >> >> >> >> *node { >> git '…' >> load 'pipeline.groovy' >> }()* >> >> Ok, I could dedicate a single node like node('pipelineControl') so the >> scripts have to be be checked out only once but this solution still doesn't >> convince me. >> >> -- 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/f6cd4fc8-31cf-435d-9fd9-ac038a7a97fb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
