Giter Site home page Giter Site logo

Comments (8)

rattermeyer avatar rattermeyer commented on September 14, 2024

Hmm. Not conviced yet. Wouldn't be another option to create a "Master" Jenkinsfile in a multi-module build and call the other Jenkinsfile, like proposed here: https://stackoverflow.com/questions/44766324/invoke-a-remote-jenkins-file-from-another-jenkinsfile.
You would not get a seperate pipeline for each module, but if you have a multi-module project, I would expect that the different modules are released and deployed together. In this case, I would like to have a single pipeline for the project and only optimize build times as you have described.

from ods-core.

michaelsauter avatar michaelsauter commented on September 14, 2024

@rattermeyer Nice find, did not know this is possible.

I am not convinced however that one would want to deploy the modules together. There are many who favour a monorepo over many repos, but that does not mean that you build a monolith (everything deployed at the same time) necessarily. Therfore I think it could make sense to have a different pipeline.

That said, I I'll think a bit more about your proposal. Also, we can wait until we have a few use cases and then decide on the best solution for this.

from ods-core.

rattermeyer avatar rattermeyer commented on September 14, 2024

Monorepo <> Multi-module project. If we talk about a monorepo, then your idea makes sense. But a monorepo should /can contain independent projects. But a multi-module build tends to have the same version for all components.

from ods-core.

michaelsauter avatar michaelsauter commented on September 14, 2024

@rattermeyer Ah yes, I was thinking more in terms of monorepo than multi-module, but still took multi-module as an example without knowing too much about it. I just used it as an example since ODS is setup for multiple repos and I wanted to avoid the repo-style discussion in this PR. If multi-module projects tend to be deployed together, then what you wrote makes more sense for them.

from ods-core.

michaelsauter avatar michaelsauter commented on September 14, 2024

As this came up in a slightly different discussion again, the solution has evolved slightly (@sino92 thanks for the hint!):

Instead of allowing to specify multiple jenkinsfiles in one webhook, we just add a feature to specify one jenkinsfile. Doing so:

  • Allows users to put the Jenkinsfile somewhere else than in the root dir
  • Allows users to create multiple webhooks, firing for potentially different events, to many Jenkinsfiles, each of which can determine if they want to run or not.

I think this is a great solution, giving a lot of flexibility and very straight-forward to implement.

from ods-core.

stitakis avatar stitakis commented on September 14, 2024

@michaelsauter idea sounds good to me but not sure if I understood it correctly... the proposed change would allow users to specify in a webhook the path and name of the Jenkinsfile, which ev. will be located not in root dir, to be triggered by Jenkins, right?

from ods-core.

michaelsauter avatar michaelsauter commented on September 14, 2024

@stitakis Yes, it would allow users to configure https://github.com/opendevstack/ods-core/blob/master/jenkins/webhook-proxy/pipeline.json#L31 by using a GET param in the webhook URL.

from ods-core.

michaelsauter avatar michaelsauter commented on September 14, 2024

I'll close this as using jenkinsfilePath and component params in the webhook URL allow to have more than one webhook per repo, and therefore the ability to trigger more than one pipeline.

Also opendevstack/ods-jenkins-shared-library#147 gives authors the building blocks to easily build their own deployment stages.

from ods-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.