-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jenkins shared library should support monorepo - multi build / deploy #222
Comments
@clemensutschig Yes!! |
@metmajer - I see this a ODS 3 features - for june (which would then support sockshop) ... thoughts? |
Fully agreed, this will be great! However, I am not sure we should put this into ODS 3 (June). I believe we have some groundwork to do:
My proposal would be to:
|
I would suggest, ability to build multiple, and deploy multiple - should be given for v3 ... the rest we can discuss :). |
@buegelbeatz - we need your input here ... you are the mr multirepo :) I could envision to provide a list of components to the shared lib config, rather than a singular. and we would execute for a first shot, the stages you provide for the contents of the list ... but I want to hear you :) |
Hi! I like this and also find this as a missing piece on the ODS library side, so to be able to manage a monorepo project with different components, yes! 1 - to simply provide the functionality of building and rollingout one or many components from the ODS (jenkins shared) library by letting the developers extend the param 2 - as mentioned, this should also be provided in the other stages provided by the library. So to be able to define one or many test results folders, sonarqube runs, snyk runs, ... Other thoughts, if many components in a monorepo, one might not always want to build and deploy everything, so maybe we shall detect or flag what to do in a per component basis... What I have been also thinking sometimes is that we could split the methods a bit more like the build to openshift stage and offer these low level methods into the library in favour of enabling the users to customise if required, if not just use the high level methods already provided (which also make use of the exposed lower level methods). An example could be splitting the build to openshift method into labelling, building, ... and also expose them as library methods. |
@gerardcl - I gave this some more thought .. and I think build / scan etc is really a nobrainer (assuming we go with a component list / map) .. deploy is going to be the interesting part ... I guess any of the n components will trigger a redeployment (assume 1 container / n pods) I think this is also the default setup we would support ... @martsec - what is your usecase? Update: I gave this some more thought over easter .. here is my proposal based on @gerardcl
The stages now know that this is a multirepo - and inside the stages instead of just building & deploying the standard one component .. it builds 2 components, based on There is also big impact to the
Note: this has also massive impact to the
@buegelbeatz / @martsec - would that make your usecases work? |
The other option is a more building block- like lesign.. that is a simple param set (map) for build/deploy stage and a User that needs it just calls it multiple times.. underneath the shared lib would track those builds and deployments in a Structure like above.. this would for sure enable the data science case from @gerardcl |
@gerardcl - in the new world .. your ml quickstarter would look like this
|
will take a look! as a first reading looks good! |
Is your feature request related to a problem? Please describe.
Today each repo is bound to a single component - that is set at the root of the shared lib
componentId
- and subsequently used in all stages, thrucontext.getComponentId()
.This is for the clean microservice architecture very useful, but less so in case there is more components in a repo (e.g. in case of a vendor supplied repo, that contains say an application and a database)
Describe the solution you'd like
The ability to override a component on a stage, e.g.
stageBuildOpenShift(...., "myComponentId")
so people can use multiple containers in one dc later .. (or multi dc) - see https://docs.openshift.com/container-platform/3.7/architecture/core_concepts/pods_and_services.htmlDescribe alternatives you've considered
copying shared lib code into the jenkins file (e.g. https://github.com/opendevstack/ods-quickstarters/blob/master/ds-ml-service/Jenkinsfile.template#L103-L135) - which is not good.
@metmajer @gerardcl @buegelbeatz
The text was updated successfully, but these errors were encountered: