Skip to content

Unable to trigger job based on another job failure #46

Closed

Description

@Nopik

For example, having single job sending out notifications about failures (e.g. put on hypothetical email-sending-resource) is not possible now. If failure could trigger some job, it should be possible to add some 'notify-about-fail' job to the pipeline and hook it up such way that any other failing job would trigger notification.

Activity

  1. concourse-bot commented on Jul 21, 2015

    @concourse-bot

    Hi there!

    We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.

    The current status is as follows:

    • #140235795 Unable to trigger job based on another job failure
    • #99488416 I can trigger a job when another job fails

    This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

  2. added a commit that references this issue on Feb 8, 2016
  3. mariash commented on Mar 18, 2016

    @mariash
    Contributor
  4. added a commit that references this issue on Jun 15, 2016
  5. friegger commented on Aug 25, 2016

    @friegger

    @mariash The on_failure step works of course, but given a bigger pipeline, one might want to declare on_failure on a job level instead. Besides avoiding duplication when many tasks have the same attributes, this seems to be the right place for notifications. When a job fails it's usually not relevant for the notification itself, which specific task failed.

    Other (probably out of scope) ideas:

    • A global default section which is applied to all tasks and/or get/put steps. This would be a generally useful feature as things like tags are often used throughout the pipeline:
    defaults:
      tasks:
        on_failure: ...
      put:
        tags: ['x']
    • A global on_failure definition for a complete pipeline run, thus a single event containing a summary of all job results/failures. Although, it seems, there is not such a thing as 'a pipeline run'.
  6. jeanbza commented on Aug 30, 2016

    @jeanbza

    +1 this feature would be nice. As an extra note, a way to distinguish this relationship would be nice - maybe a dotted line, or something like that?

  7. JohannesRudolph commented on Oct 29, 2016

    @JohannesRudolph
    Contributor

    I think this is partly addressed in v2.4 which adds job-level on_success and on_failure

  8. vito commented on Oct 29, 2016

    @vito
    Contributor

    Not really; that's just syntactic sugar so you don't have to wrap the whole plan in a do step.

  9. vito commented on Mar 15, 2017

    @vito
    Contributor

    I don't really like the idea of "left to right" in the pipeline view meaning anything but successful progression.

    I'm gonna close this since it's a "no" to the initial proposal, but a more open-ended issue covering the root of the desire (i.e. notifications/push to Slack channels/etc) may be worth having to re-open the discussion from a fresh viewpoint.

  10. added a commit that references this issue on Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions