This commit is contained in:
Mylloon 2021-07-27 23:35:37 +02:00
parent d2fa7b6563
commit 08ead1373a

View file

@ -1,26 +1,3 @@
# stages:
# - build
# - test
# - deploy
# services:
# - docker:stable-dind
# build-latest:
# image: docker:stable
# stage: build
# only:
# - main
# script:
# - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# - docker pull $CI_REGISTRY_IMAGE:latest || true
# - docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE .
# - docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:latest
# - docker push $CI_REGISTRY_IMAGE:latest
image: docker:stable image: docker:stable
stages: stages:
@ -58,6 +35,17 @@ Push latest:
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
- docker push $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: Push tag:
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none