if a failed step must not kill the rest of the job, dont just chain with &&. For a job whose failure should not fail the pipeline, set allow_failure true on the job in .gitlab-ci.yml; the pipeline turns orange instead of red and downstream jobs still run. When you need finer control inside one job, capture the failure yourself: run the risky step as ./risky-step.sh || FAILED=true, then keep going, and at the end check the flag to decide what to do, like still uploading the HTML report artifact and still running docker rm for cleanup. That way the artifacts you need for debugging exist even when the step that produced them failed.