ods-jenkins-shared-library
ods-jenkins-shared-library copied to clipboard
Component lib : introduce stage to generate project specific agent
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
Cool idea! We should experiment with this for v4 ...
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.