Switch to using Gitea Docker registry

attemptAtTagsRenovation
Jack Jackson 2 years ago
parent 8001b5bd76
commit d87a4e8414
  1. 29
      .drone.yml
  2. 2
      kubernetes-resources.yml

@ -31,23 +31,6 @@ steps:
# - echo $files # - echo $files
# - exit 1 # TODO - and alerting via Matrix! # - exit 1 # TODO - and alerting via Matrix!
# - fi # - fi
- name: copy-cert-into-place
image: busybox
volumes:
- name: docker-cert-persistence
path: /etc/docker/certs.d/
commands:
# https://stackoverflow.com/questions/72823418/how-to-make-drone-docker-plugin-use-self-signed-certs
- mkdir -p /etc/docker/certs.d/docker-registry.scubbo.org:8843
- cp /registry_cert.crt /etc/docker/certs.d/docker-registry.scubbo.org:8843/ca.crt
- name: check-cert-persists-between-stages
image: alpine
volumes:
- name: docker-cert-persistence
path: /etc/docker/certs.d/
commands:
- apk add curl
- curl https://docker-registry.scubbo.org:8843/v2/_catalog --cacert /etc/docker/certs.d/docker-registry.scubbo.org:8843/ca.crt
- name: build-blog - name: build-blog
image: alpine image: alpine
# Very unlikely to need updates, and pulling images seems slow on this setup - # Very unlikely to need updates, and pulling images seems slow on this setup -
@ -62,14 +45,15 @@ steps:
- hugo --source blog - hugo --source blog
- name: push-built-image - name: push-built-image
image: plugins/docker image: plugins/docker
volumes:
- name: docker-cert-persistence
path: /etc/docker/certs.d/
settings: settings:
repo: docker-registry.scubbo.org:8843/scubbo/blog_nginx registry: gitea.scubbo.org
repo: gitea.scubbo.org/scubbo/blog_nginx
tags: built_in_ci tags: built_in_ci
debug: true debug: true
launch_debug: true launch_debug: true
username: scubbo
password:
from_secret: gitea_password
- name: update_blog_deployment - name: update_blog_deployment
# I've tried using https://github.com/sinlead/drone-kubectl and # I've tried using https://github.com/sinlead/drone-kubectl and
# https://github.com/honestbee/drone-kubernetes, but neither is built for arm64 # https://github.com/honestbee/drone-kubernetes, but neither is built for arm64
@ -103,6 +87,3 @@ steps:
from_secret: k8s_cert from_secret: k8s_cert
kubernetesToken: kubernetesToken:
from_secret: k8s_token from_secret: k8s_token
volumes:
- name: docker-cert-persistence
temp: {}

@ -34,7 +34,7 @@ spec:
# (Unique to rancher/k3s. On traditional k8s installs, I suspect https://github.com/kubernetes/kubernetes/issues/43924 # (Unique to rancher/k3s. On traditional k8s installs, I suspect https://github.com/kubernetes/kubernetes/issues/43924
# is the way) # is the way)
- name: app - name: app
image: "docker-registry.scubbo.org:8843/scubbo/blog_nginx:built_in_ci" image: "gitea.scubbo.org/scubbo/blog_nginx:built_in_ci"
imagePullPolicy: 'Always' imagePullPolicy: 'Always'
resources: resources:
requests: requests:

Loading…
Cancel
Save