fix: delete image after build or push, use orgsecret
This commit is contained in:
parent
390308609f
commit
3658b3b004
16
.drone.yml
16
.drone.yml
@ -3,7 +3,6 @@ type: docker
|
||||
name: build-image-x86_64
|
||||
|
||||
steps:
|
||||
|
||||
- name: build-image-latest
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
@ -21,33 +20,24 @@ steps:
|
||||
- make container-image/push
|
||||
environment:
|
||||
CONTAINER_IMAGE_REGISTRY_PASSWORD:
|
||||
from_secret: CONTAINER_IMAGE_REGISTRY_PASSWORD
|
||||
from_secret: container_image_registry_password
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- cron
|
||||
|
||||
- name: push-image-tagged
|
||||
- name: delete-image-latest
|
||||
image: docker.io/volkerraschek/build-image:latest
|
||||
commands:
|
||||
- make container-image/push
|
||||
environment:
|
||||
CONTAINER_IMAGE_VERSION: ${DRONE_TAG}
|
||||
CONTAINER_IMAGE_REGISTRY_PASSWORD:
|
||||
from_secret: CONTAINER_IMAGE_REGISTRY_PASSWORD
|
||||
- make container-image/delete
|
||||
volumes:
|
||||
- name: docker_socket
|
||||
path: /var/run/docker.sock
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
7
Makefile
7
Makefile
@ -37,6 +37,13 @@ container-image/build:
|
||||
--tag ${CONTAINER_IMAGE_SHORT} \
|
||||
.
|
||||
|
||||
# DELETE CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY:=container-image/delete
|
||||
container-image/delete:
|
||||
- ${CONTAINER_RUNTIME} image rm ${CONTAINER_IMAGE_FULL} ${CONTAINER_IMAGE_SHORT}
|
||||
- ${CONTAINER_RUNTIME} image rm ${BASE_IMAGE_FULL}
|
||||
|
||||
# PUSH CONTAINER IMAGE
|
||||
# ==============================================================================
|
||||
PHONY+=container-image/push
|
||||
|
Loading…
Reference in New Issue
Block a user