Skip to content

fail step #5912

@zoeyfyi

Description

@zoeyfyi

Note: If you're requesting a Helm chart option that may be very niche and not useful to the community at large, please consider using Kustomize to apply "last mile" tweaks to the output of helm template to suit your needs instead.

Checklist

  • I've searched the issue queue to verify this is not a duplicate feature request.
  • I've pasted the output of kargo version, if applicable.
  • I've pasted logs, if applicable.

Proposed Feature

If you want to be able to fail a promotion task based on an expression evaluation, there doesn't appear to be a good way to do that at the moment. You can kind of do it by misusing the http step, pointing it to an invalid url and using the failureExpression to do the evaluation, kind of like this:

steps:
- uses: http
  config:
    url: https://url.that.doesnt.exist
    successExpression: true
    failureExpression: expressionThatWillFailPipelineIfTrue

Instead if we had a step what always failed, we could use conditional step execution, avoiding the http request:

steps:
- uses: fail
  if: ${{ expressionThatWillFailPipelineIfTrue }}

Motivation

It may be necessary to fail the pipeline based on freight/chart/http outputs, this gives us a clear tool for doing so


Happy to work on this if it gets approved :)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions