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
clean1:
tags:- bash
stage: clean
script: - echo “”
- echo “Clean up existing docker containers”
- docker stop frontend
- docker rm $_
- echo “”
allow_failure: true
- bash
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