bringing back old push

This commit is contained in:
Mylloon 2021-08-16 20:21:39 +02:00
parent 7bfc498ed4
commit 0dcbdcfa2c

View file

@ -20,24 +20,46 @@ before_script:
Build:
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE:dev-wavelink || true
- docker pull $CI_REGISTRY_IMAGE:dev || true
- >
docker build
--pull
--build-arg VCS_REF=$CI_COMMIT_SHA
--build-arg VCS_URL=$CI_PROJECT_URL
--cache-from $CI_REGISTRY_IMAGE:dev-wavelink
--cache-from $CI_REGISTRY_IMAGE:dev
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
.
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
Push dev-wavelink:
Push latest:
variables:
GIT_STRATEGY: none
stage: push
only:
- dev-wavelink
- main
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:dev-wavelink
- docker push $CI_REGISTRY_IMAGE:dev-wavelink
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
Push dev:
variables:
GIT_STRATEGY: none
stage: push
only:
- dev
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:dev
- docker push $CI_REGISTRY_IMAGE:dev
Push tag:
variables:
GIT_STRATEGY: none
stage: push
only:
- tags
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME