Use crane to retag image remotely instead of downloading it once again
This commit is contained in:
parent
1b74417762
commit
dc6e688342
1 changed files with 9 additions and 18 deletions
27
.drone.yml
27
.drone.yml
|
@ -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
|
||||||
|
|
Reference in a new issue