Multiple Pipelines with Circle Ci

I have a project and I’d like to have one pipeline run when there is a PR and another to run after the PR is merged. Is this possible with circle ci? I’ve searched around but cannot find an answer anywhere.

Is there really not a way to do this simple thing with circleci?

Hi @decapo01,

Thanks for this question.

At the moment CircleCi doesn’t offer this type of orchestration, out of the box. But it is something I’m personally quite interested in, and that I’ve been looking into.

Although it’s a slightly tricky one, there is a way to implement what you’re looking to achieve. It involves leveraging:

  • CircleCI Webhooks feature > (Webhooks - CircleCI)
  • A third-party automation tool like Zapier, Make/Integromat, Pipedream, etc…
  • CircleCI API v2 > CircleCI API

For example, in the third-party tool, you could create an automation that:

  • Wait for webhooks deliveries from CircleCI matching specific criteria like:
    • The value of the subject element in the JSON payload containing the string Merge pull request #
    • The name element being equal to a specific value
    • Same for the status
  • Triggers a new pipeline in a specific project via the appropriate CircleCI API endpoint (CircleCI API)

Also, I would recommend adding your vote to these existing feature requests (I also added mine :smile: ):

Let me know if my suggestion would work for you.