bringing back old push
This commit is contained in:
parent
7bfc498ed4
commit
0dcbdcfa2c
1 changed files with 28 additions and 6 deletions
|
@ -20,24 +20,46 @@ before_script:
|
||||||
Build:
|
Build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- docker pull $CI_REGISTRY_IMAGE:dev-wavelink || true
|
- docker pull $CI_REGISTRY_IMAGE:dev || 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-wavelink
|
--cache-from $CI_REGISTRY_IMAGE:dev
|
||||||
--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 dev-wavelink:
|
Push latest:
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
stage: push
|
stage: push
|
||||||
only:
|
only:
|
||||||
- dev-wavelink
|
- main
|
||||||
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-wavelink
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
|
||||||
- docker push $CI_REGISTRY_IMAGE:dev-wavelink
|
- 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
|
||||||
|
|
Reference in a new issue