push a dev-wavelink

This commit is contained in:
Mylloon 2021-08-06 12:48:09 +02:00
parent 343818bb7e
commit af1bd89457

View file

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