[FEATURE] failure: ignore for pipelines

Is it possible for the failure: ignore to apply to a whole pipeline? We have a case where we have a pipeline that deploys to a sandbox environment and we want this pipeline to not fail the build, but still show failures if the deployments failed. We want this in a pipeline level because we have 1 pipeline per env for this specific case. Why? Because otherwise we’ll have a pipeline with like 500+ steps…. :grimacing:.

So anyways the goal is to have the individual steps in this pipeline as green/red as normal, then the pipeline is red, but the build overall is a success if the rest of the pipelines are green. Is this possible? Could this functionality be reasonably added to Drone?

example

Example .drone.yml:

---
kind: pipeline
type: docker
name: test failures
trigger:
  event: push
steps:
- name: test failure 1
  failure: ignore
  image: alpine
  commands:
    - exit 1
- name: test failure 2
  failure: ignore
  image: alpine
  commands:
    - exit 1
- name: test success 1
  image: alpine
  commands:
    - exit 0
5 Likes

So if I understand this properly, you have multiple pipelines running multiple steps, and may have issues with a build step in the mentioned pipeline? You might be able to get away with using:

this is essentially a step on probably your master pipeline which could have the failure: ignore statement added to it and thus become a sub-pipeline in the main that would not care if it failed. Does that answer your question?

It’s not a single step that needs to be ignored but rather the whole pipeline regardless of which step may succeed/fail.

Imagine a scenario where we have a 3 identical deployment pipelines, one for our production environment, one for our staging environment, and one for our sandbox environment. Each pipeline has 4 steps–one step for each of the services we deploy. (Note that this is a semi-contrived example to illustrate the point and not that we are actually deploying code in this manner.)

Now, we want the pipelines for stage and prod to always succeed and its important that they return success/failure as expected, but for the sandbox pipeline we just don’t care. We still want all the steps within the sandbox deployment pipeline to succeed/fail on their own, but overall we don’t care about the sum total success/failure of the pipeline. We would like to be able to set failure: ignore at the pipeline level.

Example:

kind: pipeline
type: docker
name: example
trigger:
  event: push
ignore: failure # <-- we want this
steps: [ ... ]