Skip to content

Commit f0653cd

Browse files
committed
fix(ci): remove image from registry if tests fail
1 parent ea588e2 commit f0653cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ docker-test:
8383
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
8484
script:
8585
- docker pull $IMAGE_TAG
86-
- docker run --rm $IMAGE_TAG pytest
86+
- docker run --rm $IMAGE_TAG pytest || (docker rmi $IMAGE_TAG && exit 1)
8787
only:
8888
- tags
8989
tags:

0 commit comments

Comments
 (0)