ods-jenkins-shared-library icon indicating copy to clipboard operation
ods-jenkins-shared-library copied to clipboard

Component lib : introduce stage to generate project specific agent

Open clemensutschig opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. Often the base Agent only contains the build Framework. This leads to large download times of dependencies during actual build/test phases.. during every build

Describe the solution you'd like Introduce a new stage that creates the build / imagestream and allows to pass a closure to customize that new agent and then start the build of it.

I could envision something like

odsComponentStageCreateAgent (
   boolean buildEveryTime, 
   String dockerContextDir, 
   Closure executeBeforeBuild)

and we would create a dockerfile on the fly .. which is super simple and only contains a FROM pointing to the agent used by the jenkinsfile' image

Describe alternatives you've considered Suffer time loss on every build

@metmajer / @michaelsauter

clemensutschig avatar Jun 21 '20 09:06 clemensutschig

Cool idea! We should experiment with this for v4 ...

michaelsauter avatar Jun 22 '20 13:06 michaelsauter

I see this also related to what is being discussed in https://github.com/opendevstack/ods-jenkins-shared-library/issues/387 , what do you think?

One interesting point here is to be also able to run some stages in a container that is not in the same jenkins agent pod so to have less resource restrictions if more memory or CPU is needed.

gerardcl avatar Jul 31 '20 12:07 gerardcl