Use crane to retag image remotely instead of downloading it once again

This commit is contained in:
Gabriel Augendre 2021-02-08 15:59:35 +01:00
parent 1b74417762
commit dc6e688342

View file

@ -129,25 +129,16 @@ depends_on:
- unit tests - unit tests
- pre-commit - pre-commit
- build prod images - build prod images
environment:
POETRY_OPTIONS: "--no-dev"
steps: steps:
- name: build final prod image - name: retag prod image
image: plugins/docker image: gcr.io/go-containerregistry/crane
settings: environment:
registry: rg.fr-par.scw.cloud/crocmagnon REGISTRY: rg.fr-par.scw.cloud/crocmagnon
username: { from_secret: registry_username } REGISTRY_USERNAME: { from_secret: registry_username }
password: { from_secret: registry_password } REGISTRY_PASSWORD: { from_secret: registry_password }
cache_from: commands:
- rg.fr-par.scw.cloud/crocmagnon/blog:latest-temp - crane auth login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD $REGISTRY
- rg.fr-par.scw.cloud/crocmagnon/blog:deps - crane tag rg.fr-par.scw.cloud/crocmagnon/blog:latest-temp latest
repo: rg.fr-par.scw.cloud/crocmagnon/blog
tags: latest
build_args_from_env:
- POETRY_OPTIONS
pull_image: false
purge: false
storage_driver: overlay2
when: when:
branch: branch:
- master - master