Rollback commands on fail builds

Issue #13993 duplicate
Kamil Szewczyk
created an issue

I would like the ability to run some custom commands on fail builds that happens on pipelines. Right now, our pipeline is running multiple steps including connection to third party servers/services. Sometimes this connection fails, however all other previous steps were executed and there is no way of rolling back the changes that were made.

Would it be possible to add a trigger to configuration that would pass the number of the step that failed, so that a custom script would run which would roll back any necessary changes.

Configuration could look like:

pipelines:
  branches:
    development:
      - step:
          script:
            - step 1
            - step 2
            - step 3
            - step 4
      - rollback:
          script:
            - step 1

Comments (3)

  1. Log in to comment