This commit is contained in:
Markus Pesch 2021-04-26 08:33:19 +02:00
parent 341e5767be
commit 6619b4e1bd
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 69 additions and 2 deletions

View File

@ -12,3 +12,68 @@ steps:
- push
- pull_request
- tag
- name: build-image-latest
image: docker.io/volkerraschek/build-image:latest
commands:
- make CONTAINER_RUNTIME=docker container-image/build
volumes:
- name: docker_socket
path: /var/run/docker.sock
when:
branch:
- master
- name: push-image-latest
image: docker.io/volkerraschek/build-image:latest
commands:
- make CONTAINER_RUNTIME=docker container-image/push
environment:
CONTAINER_IMAGE_REGISTRY_PASSWORD:
from_secret: container_image_registry_password
volumes:
- name: docker_socket
path: /var/run/docker.sock
when:
repo:
- volker.raschek/dyndns-client
branch:
- master
- name: push-latest-commit
environment:
GIT_PUSH_SSH_KEY:
from_secret:
github_ssh_key
image: appleboy/drone-git-push:0.2.0-linux-amd64
settings:
remote: git@github.com:volker-raschek/dyndns-client.git
force: true
when:
repo:
- volker.raschek/dyndns-client
branch:
- master
event:
- push
- name: notify
image: drillster/drone-email
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
when:
status:
- changed
- failure
volumes:
- name: docker_socket
host:
path: /var/run/docker.sock

View File

@ -25,7 +25,8 @@ BASE_IMAGE_FULLY_QUALIFIED := ${BASE_IMAGE_REGISTRY_HOST}/${BASE_IMAGE_NAMESPAC
# CONTAINER_IMAGE
CONTAINER_IMAGE_REGISTRY_HOST := docker.io
CONTAINER_IMAGE_NAMESPACE := volkerraschek
CONTAINER_IMAGE_REGISTRY_USER := volkerraschek
CONTAINER_IMAGE_NAMESPACE := ${CONTAINER_IMAGE_REGISTRY_USER}
CONTAINER_IMAGE_REPOSITORY := ${EXECUTABLE}
CONTAINER_IMAGE_VERSION := latest
CONTAINER_IMAGE_FULLY_QUALIFIED := ${CONTAINER_IMAGE_REGISTRY_HOST}/${CONTAINER_IMAGE_NAMESPACE}/${CONTAINER_IMAGE_REPOSITORY}:${CONTAINER_IMAGE_VERSION:v%=%}
@ -87,6 +88,7 @@ container-image/build:
.
container-image/push: container-image/build
${CONTAINER_RUNTIME} login ${CONTAINER_IMAGE_REGISTRY_HOST} --username ${CONTAINER_IMAGE_REGISTRY_USER} --password ${CONTAINER_IMAGE_REGISTRY_PASSWORD}
${CONTAINER_RUNTIME} push ${CONTAINER_IMAGE_FULLY_QUALIFIED}
# CONTAINER RUN - TEST