Commit f043d80d authored by totte's avatar totte
Browse files

Skip tagging of images, replace with manually triggered deployment

parent 68e0e33a
...@@ -159,37 +159,8 @@ staging images: ...@@ -159,37 +159,8 @@ staging images:
- docker manifest annotate --arch amd64 --os linux ${CI_REGISTRY_IMAGE}:latest ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64 - docker manifest annotate --arch amd64 --os linux ${CI_REGISTRY_IMAGE}:latest ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64
- docker manifest push ${CI_REGISTRY_IMAGE}:latest - docker manifest push ${CI_REGISTRY_IMAGE}:latest
# Job 9
# TODO: This should not run for :latest, but for the commit
production images:
only:
- tags
stage: release
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
before_script:
- export DOCKER_CLI_EXPERIMENTAL=enabled
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- docker pull ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64:latest
- docker tag ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64:latest ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64:$CI_COMMIT_TAG
- docker push ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64:$CI_COMMIT_TAG
- docker pull ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm:latest
- docker tag ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm:latest ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm:$CI_COMMIT_TAG
- docker push ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm:$CI_COMMIT_TAG
- docker pull ${CI_REGISTRY_IMAGE}:latest
- docker tag ${CI_REGISTRY_IMAGE}:latest ${CI_REGISTRY_IMAGE}:$CI_COMMIT_TAG
- docker push ${CI_REGISTRY_IMAGE}:$CI_COMMIT_TAG
- docker manifest create ${CI_REGISTRY_IMAGE}:$CI_COMMIT_TAG ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64:$CI_COMMIT_TAG ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm:$CI_COMMIT_TAG
- docker manifest annotate --arch amd64 --os linux ${CI_REGISTRY_IMAGE}:$CI_COMMIT_TAG ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-amd64
- docker manifest annotate --arch arm --variant v7 --os linux ${CI_REGISTRY_IMAGE}:$CI_COMMIT_TAG ${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}-arm
- docker manifest push ${CI_REGISTRY_IMAGE}:$CI_COMMIT_TAG
# Job 10 # Job 9
staging environment: staging environment:
only: only:
- master - master
...@@ -216,8 +187,9 @@ staging environment: ...@@ -216,8 +187,9 @@ staging environment:
- ssh $DEPLOY_USER@$DEPLOY_HOST -p $DEPLOY_PORT "docker login $CI_REGISTRY -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD && cd /srv/melange && docker-compose down && docker-compose pull && docker-compose up -d" - ssh $DEPLOY_USER@$DEPLOY_HOST -p $DEPLOY_PORT "docker login $CI_REGISTRY -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD && cd /srv/melange && docker-compose down && docker-compose pull && docker-compose up -d"
- curl -XPOST -H "Fastly-Key:${FASTLY_KEY}" https://api.fastly.com/service/${FASTLY_SERVICE}/purge_all - curl -XPOST -H "Fastly-Key:${FASTLY_KEY}" https://api.fastly.com/service/${FASTLY_SERVICE}/purge_all
# Job 11 # Job 10
production environment: production environment:
when: manual
only: only:
- tags - tags
tags: tags:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment