How to run failed job that depends on approval job

I have mentioned a simplified version of my config below. I am triggering a workflow build using the v1.1 preview api /build. This starts the build stage properly and waits on the hold_staging job. I manually approve it, the deploy_staging job starts and fails (this is intentional). How do I re-run the failed deploy job? I am only shown the option to re-run the entire workflow.

version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8.11
    steps:
      - setup_remote_docker:
          docker_layer_caching: true
      - checkout
      - run: |
          # steps for building the image

  deploy_staging:
    machine: true
    steps:
      - attach_workspace:
          at: /tmp/workspace
      - run: |
          # steps for deploying the image

workflows:
  version: 2
  build_test_deploy:
    jobs:
      - build:
          context: docker-registry-creds
      - hold_staging:
          type: approval
          requires:
            - build
          filters:
            branches:
              only:
                - master
                - production
      - deploy_staging:
          context: docker-registry-creds
          requires:
            - hold_staging
          filters:
             branches:
               only:
                 - master
                 - production

I just noticed that the workflow remains in the state “FAILING”. If I manually cancel it, it goes into the state “CANCELLED”. In that state I am shown the option to re-run failed jobs.

What purpose does this “FAILING” state serve? How do I get it to go the “FAILED” state?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.