Updated gitlab-ci.yml to remove images after push and build
This commit is contained in:
parent
1f701706fd
commit
5c38025139
@ -28,9 +28,10 @@ docker-build:
|
|||||||
image: docker:latest
|
image: docker:latest
|
||||||
script:
|
script:
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
- docker build --pull -t $IMAGE_TAG .
|
- docker build --no-cache --pull -t $IMAGE_TAG .
|
||||||
- docker push $IMAGE_TAG
|
- docker push $IMAGE_TAG
|
||||||
- docker tag $IMAGE_TAG $IMAGE_TAG_LATEST
|
- docker tag $IMAGE_TAG $IMAGE_TAG_LATEST
|
||||||
- docker push $IMAGE_TAG_LATEST
|
- docker push $IMAGE_TAG_LATEST
|
||||||
|
- docker rmi $IMAGE_TAG $IMAGE_TAG_LATEST
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
Loading…
Reference in New Issue
Block a user