We’ve taken sort of a middle ground approach with this on our end. We define standard flows for a particular build system (like maven)
The 80-90% use cases are allowable with our pipeline, consumers only define eome configuration options in a closure. For the extra 10% use case, we provide steps you can use “checkoutProject” “buildSite” etc, so those non standard pipelines can still make use of our functions. This has helped us standardize our disjoint development process, on the pipeline everyone deploys master but only runs verify on branches and PRs. If that doesn’t fit your use case, and the configuration option doesn’t work, we either: 1. Have a call for feedback on new option just to see how many of our consumers need the new behavior 2. Help the consumer team use our functions to make their own pipeline. On Wed, Apr 10, 2019 at 13:46 Ivan Fernandez Calvo <[email protected]> wrote: > It is a fair approach, however my opinion is that the pipeline definition > (stages and steps) should be in the project pipeline (Jenkinsfile), in the > shared library we have only steps that make only one thing an they make it > well or steps that combine several others, every step has his own unit test > and we release a new version of the library every Monday, all the > jenkinsfiles load the ’current’ version of the library that it is the > stable one. In that way we can go backwards between versions without change > anything in projects. The reason to not put the whole pipeline in the > library is that at some point you will start to write spaghetti pipeline > code to cover the whole options needed to all your projects, when that > fails would be a pain to debug such thing > > -- > 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/e1ac1fd9-f494-4113-8483-f6f1c2bee739%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CADgiF9%2BowGKQoF8t4za2V_8goxTB1ARUbVCK3FbgisDKhKpwHQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
