feat(ci): use gitea as registry and docker as mirror
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Markus Pesch 2023-03-30 22:43:28 +02:00
parent f672c8fb13
commit 5b1adb7440
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
3 changed files with 244 additions and 48 deletions

View File

@ -3,14 +3,20 @@ kind: pipeline
type: kubernetes type: kubernetes
name: linter name: linter
clone:
disable: true
platform: platform:
os: linux os: linux
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: markdown lint - name: markdown lint
commands: commands:
- markdownlint *.md - markdownlint *.md
image: docker.io/volkerraschek/markdownlint:0.33.0 image: git.cryptic.systems/volker.raschek/markdownlint:0.33.0
resources: resources:
limits: limits:
cpu: 150 cpu: 150
@ -48,25 +54,32 @@ kind: pipeline
type: docker type: docker
name: dry-run-amd64 name: dry-run-amd64
clone:
disable: true
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: false auto_tag: false
dry_run: true dry_run: true
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/markdownlint
tags: latest-amd64 tags: latest-amd64
repo: volkerraschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -104,25 +117,32 @@ kind: pipeline
type: docker type: docker
name: dry-run-arm-v7 name: dry-run-arm-v7
clone:
disable: true
platform: platform:
os: linux os: linux
arch: arm arch: arm
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: false auto_tag: false
dry_run: true dry_run: true
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/markdownlint
tags: latest-arm-v7 tags: latest-arm-v7
repo: volkerraschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -160,25 +180,32 @@ kind: pipeline
type: docker type: docker
name: dry-run-arm64-v8 name: dry-run-arm64-v8
clone:
disable: true
platform: platform:
os: linux os: linux
arch: arm64 arch: arm64
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: false auto_tag: false
dry_run: true dry_run: true
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
registry: git.cryptic.systems
tags: latest-arm64-v8 tags: latest-arm64-v8
repo: volkerraschek/markdownlint repo: git.cryptic.systems/volker.raschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -216,24 +243,31 @@ kind: pipeline
type: docker type: docker
name: latest-amd64 name: latest-amd64
clone:
disable: true
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: false auto_tag: false
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/markdownlint
tags: latest-amd64 tags: latest-amd64
repo: volkerraschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -270,24 +304,31 @@ kind: pipeline
type: docker type: docker
name: latest-arm-v7 name: latest-arm-v7
clone:
disable: true
platform: platform:
os: linux os: linux
arch: arm arch: arm
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: false auto_tag: false
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/markdownlint
tags: latest-arm-v7 tags: latest-arm-v7
repo: volkerraschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -324,24 +365,31 @@ kind: pipeline
type: docker type: docker
name: latest-arm64-v8 name: latest-arm64-v8
clone:
disable: true
platform: platform:
os: linux os: linux
arch: arm64 arch: arm64
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: false auto_tag: false
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
registry: git.cryptic.systems
tags: latest-arm64-v8 tags: latest-arm64-v8
repo: volkerraschek/markdownlint repo: git.cryptic.systems/volker.raschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -378,7 +426,13 @@ kind: pipeline
type: kubernetes type: kubernetes
name: latest-manifest name: latest-manifest
clone:
disable: true
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build-manifest - name: build-manifest
image: docker.io/plugins/manifest:latest image: docker.io/plugins/manifest:latest
settings: settings:
@ -386,9 +440,9 @@ steps:
ignore_missing: true ignore_missing: true
spec: manifest.tmpl spec: manifest.tmpl
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -417,6 +471,66 @@ depends_on:
- latest-arm-v7 - latest-arm-v7
- latest-arm64-v8 - latest-arm64-v8
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/markdownlint-docker
---
kind: pipeline
type: kubernetes
name: latest-sync
clone:
disable: true
depends_on:
- latest-manifest
steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: latest-docker-sync
commands:
- skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/markdownlint docker.io/volkerraschek
environment:
SRC_CRED_USERNAME:
from_secret: git_cryptic_systems_container_registry_user
SRC_CRED_PASSWORD:
from_secret: git_cryptic_systems_container_registry_password
DEST_CRED_USERNAME:
from_secret: container_image_registry_user
DEST_CRED_PASSWORD:
from_secret: container_image_registry_password
image: quay.io/skopeo/stable:v1.11.1
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: docker.io/volkerraschek/drone-email:0.1.1
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger: trigger:
branch: branch:
- master - master
@ -431,24 +545,31 @@ kind: pipeline
type: docker type: docker
name: tagged-amd64 name: tagged-amd64
clone:
disable: true
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: amd64 auto_tag_suffix: amd64
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
repo: volkerraschek/markdownlint registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
build_args: build_args:
- MARKDOWNLINT_VERSION=${DRONE_TAG} - MARKDOWNLINT_VERSION=${DRONE_TAG}
@ -481,24 +602,31 @@ kind: pipeline
type: docker type: docker
name: tagged-arm-v7 name: tagged-arm-v7
clone:
disable: true
platform: platform:
os: linux os: linux
arch: arm arch: arm
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm-v7 auto_tag_suffix: arm-v7
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
repo: volkerraschek/markdownlint registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
build_args: build_args:
- MARKDOWNLINT_VERSION=${DRONE_TAG} - MARKDOWNLINT_VERSION=${DRONE_TAG}
@ -531,24 +659,31 @@ kind: pipeline
type: docker type: docker
name: tagged-arm64-v8 name: tagged-arm64-v8
clone:
disable: true
platform: platform:
os: linux os: linux
arch: arm64 arch: arm64
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build - name: build
image: docker.io/plugins/docker:latest image: docker.io/plugins/docker:20.10.9
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm64-v8 auto_tag_suffix: arm64-v8
force_tag: true force_tag: true
no_cache: true no_cache: true
purge: true purge: true
repo: volkerraschek/markdownlint registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/markdownlint
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
build_args: build_args:
- MARKDOWNLINT_VERSION=${DRONE_TAG} - MARKDOWNLINT_VERSION=${DRONE_TAG}
@ -581,7 +716,13 @@ kind: pipeline
type: kubernetes type: kubernetes
name: tagged-manifest name: tagged-manifest
clone:
disable: true
steps: steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: build-manifest - name: build-manifest
image: docker.io/plugins/manifest:latest image: docker.io/plugins/manifest:latest
settings: settings:
@ -589,9 +730,9 @@ steps:
ignore_missing: true ignore_missing: true
spec: manifest.tmpl spec: manifest.tmpl
username: username:
from_secret: container_image_registry_user from_secret: git_cryptic_systems_container_registry_user
password: password:
from_secret: container_image_registry_password from_secret: git_cryptic_systems_container_registry_password
- name: email-notification - name: email-notification
environment: environment:
@ -625,3 +766,60 @@ trigger:
- tag - tag
repo: repo:
- volker.raschek/markdownlint-docker - volker.raschek/markdownlint-docker
---
kind: pipeline
type: kubernetes
name: tagged-sync
clone:
disable: true
steps:
- name: clone
image: docker.io/drone/git:1.2.1
- name: tagged-docker-sync
commands:
- skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/markdownlint docker.io/volkerraschek
environment:
SRC_CRED_USERNAME:
from_secret: git_cryptic_systems_container_registry_user
SRC_CRED_PASSWORD:
from_secret: git_cryptic_systems_container_registry_password
DEST_CRED_USERNAME:
from_secret: container_image_registry_user
DEST_CRED_PASSWORD:
from_secret: container_image_registry_password
image: quay.io/skopeo/stable:v1.11.1
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: docker.io/volkerraschek/drone-email:0.1.1
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
depends_on:
- tagged-manifest
trigger:
event:
- tag
repo:
- volker.raschek/markdownlint-docker

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
# IntelliJ # IntelliJ
.idea/ .idea/
sync.sh

View File

@ -1,4 +1,4 @@
image: volkerraschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} image: git.cryptic.systems/volker.raschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
@ -7,19 +7,16 @@ tags:
- "latest" - "latest"
{{/if}} {{/if}}
manifests: manifests:
- - image: git.cryptic.systems/volker.raschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
image: volkerraschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- - image: git.cryptic.systems/volker.raschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm-v7
image: volkerraschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm-v7
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- - image: git.cryptic.systems/volker.raschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
image: volkerraschek/markdownlint:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux