Skip to content

Support adding hooks at the job level, rather than individual steps #166

Closed

Description

@vito

e.g.:

name: my-job
plan:
- get: something
- task: run-something
on_failure: {...}
on_success: {...}
ensure: {...}

would be equivalent to:

name: my-job
plan:
- do:
  - get: something
  - task: run-something
  on_failure: {...}
  on_success: {...}
  ensure: {...}

Activity

  1. changed the title [-]Suppoy adding hooks at the job level, rather than individual steps[/-] [+]Support adding hooks at the job level, rather than individual steps[/+] on Oct 14, 2015
  2. robdimsdale commented on Oct 14, 2015

    @robdimsdale
    Contributor

    +1

  3. concourse-bot commented on Oct 14, 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:

    • #105686432 Support adding hooks at the job level, rather than individual steps

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

  4. bendodd commented on Feb 21, 2016

    @bendodd

    +1

  5. mtekel commented on May 9, 2016

    @mtekel

    +1. I'd like to be add ensure into do or aggregate blocks (and not directly to each task).

  6. mtekel commented on May 9, 2016

    @mtekel

    As it turns out, it does what I need to do in concourse 0.76, but the interface only shows ensure block for the last task (yet it works as ensure block for whole do):

          - do:
            - task: create-temp-user
              file: paas-cf/concourse/tasks/create_admin.yml
              config:
                params:
                  PREFIX: smoketest-user
    
            - task: smoke-tests-config
              file: paas-cf/concourse/tasks/smoke-tests-config.ymll
    
            - task: smoke-tests-run
              file: paas-cf/concourse/tasks/smoke-tests-run.yml
            ensure:
              task: remove-temp-user
              file: paas-cf/concourse/tasks/delete_admin.yml
    

    renders as
    image
    but works as ensure for the whole do block:
    image

    Also, documentation mentions that you can only do ensure on a step.
    EDIT: apparently this happens in 1.1 as well. Created a separate issue #434

  7. added a commit that references this issue on Aug 4, 2016
  8. added a commit that references this issue on Mar 29, 2018
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