Stage Failure is OK

Looking for an easy way to allow a stage to fail

Stage Failure is OK

  • What I’m hoping for is a way to clean out existing docker containers

    • if the container doesn’t exist, I want the pipeline to continue
    • if the container does exist, I want it removed before we go to the next deployment stage
  • clean stage of my .gitlab-ci.yml

    • bash
      stage: clean
    • echo “”
    • echo “Clean up existing docker containers”
    • docker stop frontend
    • docker rm $_
    • echo “”
      allow_failure: true

The allow_failure doesn’t seem to work. It doesn’t continue to the next stage of the pipeline if it fails
Thanks in advance for any tips or helps with this issue :blush:

For some reason…the allow_failure started working. Not sure what I did, but this post can be closed.