Skip to content
Snippets Groups Projects

Resolve "Implement cleanup after pipeline"

Compare and
1 file
+ 12
0
Compare changes
  • Side-by-side
  • Inline
+ 12
0
@@ -10,6 +10,7 @@ cache:
stages:
- build
- publish
- cleanup
# ===========================================================================
@@ -91,3 +92,14 @@ docker-push-tag:
script:
- docker load -i build/image.tar
- docker push $DOCKER_NAMESPACE/$PROJECT_NAME:$CI_COMMIT_TAG
cleanup:
stage: cleanup
image: docker:git
tags:
- cache
script:
- docker system prune -a -f || true
- rm -rf build/ || true
when: always
allow_failure: true