Code Monkey home page Code Monkey logo

Comments (7)

foosinn avatar foosinn commented on July 22, 2024

Hey @kdisneur,

have you tried https://docs.drone.io/configure/pipeline/multiple/#graph-execution

Sound like it should work.

from drone-tree-config.

kdisneur avatar kdisneur commented on July 22, 2024

We tried this but we might have misunderstood something because we weren't able to make it work in the monorepo context.

When we installed drone-tree-config we added a .drone.yaml by project:

monorepo/
  project-a/
    .drone.yaml # pipeline: project-a
    ...
  project-b/
    .drone.yaml # pipeline: project-b
    ...
  project-c/
    .drone.yaml # pipeline: project-c
    ...
  ....

drone-tree-config concatenates all the projects' drone.yaml files and drone builds each pipelines properly (i.e. project-a, project-b, and project-c).

We then tried to add a drone.yaml file at the root of the repository which depends of all possible pipelines:

depends_on: 
  - project-a
  - project-b
  - project-c

It worked if we changed all projects (i.e. project-a, project-b, and project-c) but didn't work if we only changed some projects (e.g. project-a and project-b) because it depends_on a non existing pipeline (project-c).

We don't know how to tell drone to run the pipeline when, in this example, project-a and project-b finished (or another combination depending of what changed in the monorepo).

To summarize: we would like the pipeline to wait for all the "project's pipelines" to successfully finish before starting but we don't know how to dynamically define the "project pipelines" we need to wait for.

from drone-tree-config.

foosinn avatar foosinn commented on July 22, 2024

did you name the pipeline steps?

from drone-tree-config.

kdisneur avatar kdisneur commented on July 22, 2024

Yes I think so. You can find an example repository here: https://github.com/kdisneur/monodroneci

If I change something in project-a it works, it builds only project-a
If I change something in project-b it works, it builds only project-b
If I change something in both it works, it builds both

I then tried to add, at the root of the repository, another drone.yaml (kdisneur/monodroneci@5713be5). It works if I change both projects but fails if I change only one of them because the other pipeline doesnโ€™t exist.

The error makes sense, I just donโ€™t know how to get around it.

from drone-tree-config.

foosinn avatar foosinn commented on July 22, 2024

Hmm, thats a good point. I am not sure how to fix this.

One way would be that drone allows non-existing steps to be gracefully skipped.

Another one would be that drone-tree-config parses all files and removes non existing steps, which means a lot more complexity.

You are welcome to contribute the second option, right now we have neigher a requirement nor the time to implement this.

from drone-tree-config.

kdisneur avatar kdisneur commented on July 22, 2024

OK. Thanks for your help :)

To be honest we don't really need this last pipeline. What we really need is a way to know Drone-CI finished to build the projects but we didn't find any webhook configuration in Drone-CI.

I will try to dig a little bit more the webhook solution with the Drone-CI community. If I don't find anything, I will try to suggest something here :)

Thanks again ๐Ÿ™‡

from drone-tree-config.

yekibud avatar yekibud commented on July 22, 2024

Hi @kdisneur - we could really use a solution to this, as well, did you figure anything out? @foosinn 's option to modify drone (or woodpecker?) to gracefully ignore non-existent pipeline dependencies seems like the best solution to me. Don't think I'm going to be able to find the time to learn Go and look into it soon, though, unfortunately.

from drone-tree-config.

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.