12 Commits

Author SHA1 Message Date
c07e8209cc Update golang Docker tag to v1.25
All checks were successful
continuous-integration/drone/push Build is passing
2025-08-14 10:03:27 +00:00
598fc6536f Fix image
Some checks reported errors
continuous-integration/drone/push Build was killed
2024-11-23 13:32:49 +01:00
b52029788f Fix promotion job
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is failing
2024-11-23 13:11:20 +01:00
88a16d0209 Fix image for promotion and cleanup
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is failing
2024-11-23 13:00:34 +01:00
aa8faa8b5b Try to fix multi-arch build
Some checks failed
continuous-integration/drone/push Build is failing
2024-11-23 12:48:11 +01:00
2ffba27f1d Add promote job
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is failing
continuous-integration/drone/promote/production Build is passing
2024-11-22 11:04:21 +01:00
b62f5d0a03 Fix variable name
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-22 10:52:52 +01:00
878f2f142a Update restic to 0.17.3
Some checks failed
continuous-integration/drone/push Build is failing
2024-11-22 10:30:13 +01:00
6dbd7eab7e Merge pull request 'Update mgoltzsche/podman Docker tag to v5' (#4) from renovate/mgoltzsche-podman-5.x into main
Some checks are pending
continuous-integration/drone/push Build is running
Reviewed-on: #4
2024-11-22 09:29:00 +00:00
717f351413 Merge pull request 'Update golang Docker tag to v1.23' (#5) from renovate/golang-1.x into main
Some checks are pending
continuous-integration/drone/push Build is running
Reviewed-on: #5
2024-11-22 09:28:50 +00:00
9bd4abc641 Update mgoltzsche/podman Docker tag to v5
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-22 09:25:56 +00:00
801f4eb269 Update golang Docker tag to v1.23
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-14 09:16:01 +00:00
2 changed files with 61 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ name: build
steps:
- name: build
image: mgoltzsche/podman:4.9.5
image: mgoltzsche/podman:5.3.1
privileged: true
environment:
REGISTRY_USERNAME:
@@ -19,10 +19,12 @@ steps:
RESTIC_VERSION=$$(grep RESTIC_VERSION= Dockerfile|cut -d = -f 2)
podman login --username "$${REGISTRY_USERNAME}" --password "$${REGISTRY_PASSWORD}" "$${REGISTRY_SERVER}"
echo "== Building $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}"
podman build --platform linux/arm64 --platform linux/amd64 --pull-always --format docker -t $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} .
podman manifest create $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
podman build --platform linux/arm64,linux/amd64 --pull-always --manifest $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} .
podman manifest inspect $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
echo "== Publishing $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}"
podman push $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} docker://$${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
podman push $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} docker://$${RELEASE_IMAGE_NAME}:$${HASS_VERSION}
podman manifest push $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} docker://$${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
podman manifest push $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} docker://$${RELEASE_IMAGE_NAME}:$${RESTIC_VERSION}
podman logout "$${REGISTRY_SERVER}"
volumes:
- name: containers
@@ -32,12 +34,12 @@ steps:
- main
- name: cleanup
image: mgoltzsche/podman:4.9.5
image: mgoltzsche/podman:5.3.1
privileged: true
environment:
RELEASE_IMAGE_NAME: "docker.io/genunix/restic"
commands:
- podman rmi -f $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
- podman manifest rm $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} || true
- podman image prune -f
volumes:
- name: containers
@@ -55,3 +57,54 @@ volumes:
- name: containers
host:
path: /var/lib/containers
---
kind: pipeline
type: kubernetes
name: promote
steps:
- name: promote
image: mgoltzsche/podman:5.3.1
privileged: true
environment:
REGISTRY_USERNAME:
from_secret: registry_username
REGISTRY_PASSWORD:
from_secret: registry_password
REGISTRY_SERVER: "docker.io"
RELEASE_IMAGE_NAME: "docker.io/genunix/restic"
commands:
- podman login --username "$${REGISTRY_USERNAME}" --password "$${REGISTRY_PASSWORD}" "$${REGISTRY_SERVER}"
- echo "== Pulling $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}"
- podman pull --arch amd64 docker://$${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
- podman pull --arch arm64 docker://$${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
- podman manifest inspect $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA}
- echo "== Promoting $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} into production as latest tag"
- podman manifest push $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} docker://$${RELEASE_IMAGE_NAME}:latest
- podman logout "$${REGISTRY_SERVER}"
volumes:
- name: containers
path: /var/lib/containers
- name: cleanup
image: mgoltzsche/podman:5.3.1
privileged: true
environment:
RELEASE_IMAGE_NAME: "docker.io/genunix/restic"
commands:
- podman manifest rm $${RELEASE_IMAGE_NAME}:$${DRONE_COMMIT_SHA} || true
- podman image prune -f
volumes:
- name: containers
path: /var/lib/containers
trigger:
event:
- promote
target:
- production
volumes:
- name: containers
host:
path: /var/lib/containers

View File

@@ -1,6 +1,6 @@
FROM golang:1.22-alpine AS builder
FROM golang:1.25-alpine AS builder
ARG RESTIC_VERSION=0.16.4
ARG RESTIC_VERSION=0.17.3
RUN apk add --no-cache git
RUN git clone --depth 1 --branch v${RESTIC_VERSION} https://github.com/restic/restic.git /go/src/github.com/restic/restic