flosell / lambdacd

a library to define a continuous delivery pipeline in code
https://www.lambda.cd/
Apache License 2.0
676 stars 59 forks source link

Best practice w/ mid-pipeline manual trigger? #181

Closed magnars closed 6 years ago

magnars commented 6 years ago

Hi!

My pipelines generally look like this:

Check out -> test -> build -> manual trigger -> deploy

Now, the manual trigger pauses the pipeline, and any subsequent commits are not built. If multiple people are working on the same repo, those changes aren't tested until someone manually stops the blocking build.

How do you normally work around this issue?

flosell commented 6 years ago

Usually, people handle that by choosing a different pipeline runner:

The leiningen template has (runners/start-one-run-after-another pipeline) as a default (since it's the option that won't go crazy if people make mistakes like removing the trigger steps) that starts a new pipeline-run after the pipeline completes.

start-new-run-after-first-step-finished is probably what you are looking for. It makes the assumption that the first section of your pipeline is a trigger (e.g. something that waits for a commit) and starts a new run immediately after this section completes (i.e. the pipeline is triggered).

magnars commented 6 years ago

Excellent, that makes perfect sense. Thank you.