You've already forked dcmerge
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
445a9b6799
|
|||
cd521a803b
|
|||
5c7b14e6cb
|
|||
fb3af62fc3
|
|||
e30c7c007f
|
|||
973e90986c
|
|||
90a6350a02
|
|||
89f4f5b0fa
|
|||
ee1474a506
|
|||
1d33b165eb
|
|||
6fb289da71
|
|||
ed0b94e4b8
|
|||
5f06edff04
|
|||
5560d13550
|
|||
6387e972e3
|
|||
5eec7fc1a5
|
|||
0688315658
|
|||
63a54e130d
|
|||
ef1c7f25a3
|
|||
cc9c98b84d
|
|||
9f29df1311
|
|||
1d8a8d7b76 | |||
3e73692f28
|
|||
7a0c89c8b7 |
727
.drone.yml
727
.drone.yml
@ -1,727 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: linter
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: markdown lint
|
|
||||||
commands:
|
|
||||||
- markdownlint *.md
|
|
||||||
image: git.cryptic.systems/volker.raschek/markdownlint:0.43.0
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 150
|
|
||||||
memory: 150M
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 150
|
|
||||||
memory: 150M
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: unit-test-amd64
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
platform:
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: unit-test
|
|
||||||
commands:
|
|
||||||
- go test -v ./...
|
|
||||||
image: docker.io/library/golang:1.24.0
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: unit-test-arm64
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
platform:
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: unit-test
|
|
||||||
commands:
|
|
||||||
- go test -v ./...
|
|
||||||
image: docker.io/library/golang:1.24.0
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- pull_request
|
|
||||||
- push
|
|
||||||
exclude:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: dry-run-amd64
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- linter
|
|
||||||
- unit-test-amd64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.18.7
|
|
||||||
settings:
|
|
||||||
auto_tag: false
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
dry_run: true
|
|
||||||
force_tag: true
|
|
||||||
no_cache: true
|
|
||||||
purge: true
|
|
||||||
mirror:
|
|
||||||
from_secret: docker_io_mirror
|
|
||||||
registry: git.cryptic.systems
|
|
||||||
repo: git.cryptic.systems/volker.raschek/dcmerge
|
|
||||||
tags: latest-amd64
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
exclude:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
- push
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: dry-run-arm64-v8
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- linter
|
|
||||||
- unit-test-arm64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.18.7
|
|
||||||
settings:
|
|
||||||
auto_tag: false
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
dry_run: true
|
|
||||||
force_tag: true
|
|
||||||
no_cache: true
|
|
||||||
purge: true
|
|
||||||
mirror:
|
|
||||||
from_secret: docker_io_mirror
|
|
||||||
registry: git.cryptic.systems
|
|
||||||
repo: git.cryptic.systems/volker.raschek/dcmerge
|
|
||||||
tags: latest-arm64-v8
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
exclude:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
- push
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: latest-amd64
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- linter
|
|
||||||
- unit-test-amd64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.18.7
|
|
||||||
settings:
|
|
||||||
auto_tag: false
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
force_tag: true
|
|
||||||
no_cache: true
|
|
||||||
purge: true
|
|
||||||
mirror:
|
|
||||||
from_secret: docker_io_mirror
|
|
||||||
registry: git.cryptic.systems
|
|
||||||
repo: git.cryptic.systems/volker.raschek/dcmerge
|
|
||||||
tags: latest-amd64
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- cron
|
|
||||||
- push
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: latest-arm64-v8
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- linter
|
|
||||||
- unit-test-arm64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.18.7
|
|
||||||
settings:
|
|
||||||
auto_tag: false
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
force_tag: true
|
|
||||||
no_cache: true
|
|
||||||
purge: true
|
|
||||||
mirror:
|
|
||||||
from_secret: docker_io_mirror
|
|
||||||
registry: git.cryptic.systems
|
|
||||||
repo: git.cryptic.systems/volker.raschek/dcmerge
|
|
||||||
tags: latest-arm64-v8
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- cron
|
|
||||||
- push
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: latest-manifest
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- latest-amd64
|
|
||||||
- latest-arm64-v8
|
|
||||||
|
|
||||||
# docker.io/plugins/manifest only for amd64 architectures available
|
|
||||||
node_selector:
|
|
||||||
kubernetes.io/os: linux
|
|
||||||
kubernetes.io/arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build-manifest
|
|
||||||
image: docker.io/plugins/manifest:1.4.0
|
|
||||||
settings:
|
|
||||||
auto_tag: false
|
|
||||||
ignore_missing: true
|
|
||||||
spec: manifest.tmpl
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 150
|
|
||||||
memory: 150M
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- cron
|
|
||||||
- push
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: latest-sync
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- latest-manifest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: latest-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/dcmerge 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.18.0
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 150
|
|
||||||
memory: 150M
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
|
||||||
- cron
|
|
||||||
- push
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: tagged-amd64
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.18.7
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: amd64
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
force_tag: true
|
|
||||||
no_cache: true
|
|
||||||
purge: true
|
|
||||||
mirror:
|
|
||||||
from_secret: docker_io_mirror
|
|
||||||
registry: git.cryptic.systems
|
|
||||||
repo: git.cryptic.systems/volker.raschek/dcmerge
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
build_args:
|
|
||||||
- VERSION=${DRONE_TAG}
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: tagged-arm64-v8
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.18.7
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: arm64-v8
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
force_tag: true
|
|
||||||
no_cache: true
|
|
||||||
purge: true
|
|
||||||
mirror:
|
|
||||||
from_secret: docker_io_mirror
|
|
||||||
registry: git.cryptic.systems
|
|
||||||
repo: git.cryptic.systems/volker.raschek/dcmerge
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
build_args:
|
|
||||||
- VERSION=${DRONE_TAG}
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: tagged-manifest
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- tagged-amd64
|
|
||||||
- tagged-arm64-v8
|
|
||||||
|
|
||||||
# docker.io/plugins/manifest only for amd64 architectures available
|
|
||||||
node_selector:
|
|
||||||
kubernetes.io/os: linux
|
|
||||||
kubernetes.io/arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: build-manifest
|
|
||||||
image: docker.io/plugins/manifest:1.4.0
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
ignore_missing: true
|
|
||||||
spec: manifest.tmpl
|
|
||||||
username:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_user
|
|
||||||
password:
|
|
||||||
from_secret: git_cryptic_systems_container_registry_password
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 150
|
|
||||||
memory: 150M
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: tagged-sync
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- tagged-manifest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
|
||||||
|
|
||||||
- name: tagged-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/dcmerge 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.18.0
|
|
||||||
|
|
||||||
- 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: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 150
|
|
||||||
memory: 150M
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- changed
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
repo:
|
|
||||||
- volker.raschek/dcmerge
|
|
21
.gitea/workflows/golang-tests.yaml
Normal file
21
.gitea/workflows/golang-tests.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Golang Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ "opened", "reopened", "synchronize" ]
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
tags-ignore: [ '**' ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
unittest:
|
||||||
|
runs-on:
|
||||||
|
- ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.2.2
|
||||||
|
- uses: actions/setup-go@v5.5.0
|
||||||
|
with:
|
||||||
|
go-version: stable
|
||||||
|
- env:
|
||||||
|
GOPROXY: ${{ vars.GOPROXY }}
|
||||||
|
run: make test/unit
|
20
.gitea/workflows/markdown-linters.yaml
Normal file
20
.gitea/workflows/markdown-linters.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Markdown linter
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ "opened", "reopened", "synchronize" ]
|
||||||
|
push:
|
||||||
|
branches: [ '**' ]
|
||||||
|
tags-ignore: [ '**' ]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
markdown-lint:
|
||||||
|
container:
|
||||||
|
image: git.cryptic.systems/volker.raschek/markdownlint:0.45.0
|
||||||
|
runs-on:
|
||||||
|
- ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.2.2
|
||||||
|
- name: Lint Markdown files
|
||||||
|
run: markdownlint --config .markdownlint.yaml .
|
52
.gitea/workflows/release.yaml
Normal file
52
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: [ '**' ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on:
|
||||||
|
- ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.2.2
|
||||||
|
- uses: docker/setup-qemu-action@v3.6.0
|
||||||
|
- uses: actions/setup-go@v5.5.0
|
||||||
|
with:
|
||||||
|
go-version: stable
|
||||||
|
- uses: docker/login-action@v3.4.0
|
||||||
|
with:
|
||||||
|
registry: git.cryptic.systems
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
- env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
GONOSUMDB: ${{ vars.GONOSUMDB }}
|
||||||
|
GOPROXY: ${{ vars.GOPROXY }}
|
||||||
|
uses: goreleaser/goreleaser-action@v6.3.0
|
||||||
|
with:
|
||||||
|
version: "~> v2"
|
||||||
|
args: release --clean
|
||||||
|
|
||||||
|
sync-to-hub-docker-io:
|
||||||
|
needs:
|
||||||
|
- release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Copy images to docker.io
|
||||||
|
run: |
|
||||||
|
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
||||||
|
|
||||||
|
apt-get update --yes
|
||||||
|
apt-get install --yes skopeo
|
||||||
|
skopeo copy \
|
||||||
|
--all \
|
||||||
|
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
|
||||||
|
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
|
||||||
|
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
|
||||||
|
--src-username volker.raschek \
|
||||||
|
docker://git.cryptic.systems/volker.raschek/dcmerge:${TAG} \
|
||||||
|
docker://docker.io/volkerraschek/dcmerge:${TAG}
|
19
.gitea/workflows/update-docker-hub-description.yaml
Normal file
19
.gitea/workflows/update-docker-hub-description.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: Update Docker Hub Description
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'master' ]
|
||||||
|
paths: [ 'README.md' ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-description-on-hub-docker-io:
|
||||||
|
runs-on:
|
||||||
|
- ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.2.2
|
||||||
|
- uses: peter-evans/dockerhub-description@v4.0.2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_IO_PASSWORD }}
|
||||||
|
repository: volkerraschek/dcmerge
|
||||||
|
readme-filepath: README.md
|
175
.goreleaser.yaml
Normal file
175
.goreleaser.yaml
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
project_name: dcmerge
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- formats: [ "tar.xz" ]
|
||||||
|
files:
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- main: main.go
|
||||||
|
binary: >-
|
||||||
|
{{ .ProjectName }}-
|
||||||
|
{{- .Version }}-
|
||||||
|
{{- .Os }}-
|
||||||
|
{{- if eq .Arch "amd64" }}amd64
|
||||||
|
{{- else if eq .Arch "amd64_v1" }}amd64
|
||||||
|
{{- else }}{{ .Arch }}{{ end }}
|
||||||
|
{{- if .Arm }}-{{ .Arm }}{{ end }}
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
- GONOSUMDB={{ .Env.GONOSUMDB }}
|
||||||
|
- GOPROXY={{ .Env.GOPROXY }}
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm
|
||||||
|
- arm64
|
||||||
|
- riscv64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X 'main.version={{ trimprefix .Tag "v" }}'
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- '^chore'
|
||||||
|
- '^docs'
|
||||||
|
- '^test'
|
||||||
|
- Merge pull request
|
||||||
|
- Merge branch
|
||||||
|
- go mod tidy
|
||||||
|
format: "{{.SHA}}: {{.Message}} (@{{.AuthorUsername}})"
|
||||||
|
groups:
|
||||||
|
- title: Features
|
||||||
|
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
||||||
|
order: 0
|
||||||
|
- title: "Bug fixes"
|
||||||
|
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
||||||
|
order: 1
|
||||||
|
- title: Others
|
||||||
|
order: 999
|
||||||
|
sort: asc
|
||||||
|
use: git
|
||||||
|
|
||||||
|
dockers:
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/amd64
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: amd64
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/arm/v6
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: arm
|
||||||
|
goarm: "6"
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/arm/v7
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: arm
|
||||||
|
goarm: "7"
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/arm64
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: arm64
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
- build_flag_templates:
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.source={{ .GitURL }}
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
||||||
|
- --platform=linux/riscv64
|
||||||
|
- --pull
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
goarch: riscv64
|
||||||
|
goos: linux
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
|
||||||
|
skip_push: false
|
||||||
|
use: buildx
|
||||||
|
|
||||||
|
docker_manifests:
|
||||||
|
- name_template: 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}'
|
||||||
|
image_templates:
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
||||||
|
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
|
||||||
|
|
||||||
|
gitea_urls:
|
||||||
|
api: https://git.cryptic.systems/api/v1
|
||||||
|
download: https://git.cryptic.systems
|
||||||
|
|
||||||
|
version: 2
|
@ -56,8 +56,6 @@ MD013:
|
|||||||
tables: false
|
tables: false
|
||||||
# Include headings
|
# Include headings
|
||||||
headings: true
|
headings: true
|
||||||
# Include headings
|
|
||||||
headers: true
|
|
||||||
# Strict length checking
|
# Strict length checking
|
||||||
strict: false
|
strict: false
|
||||||
# Stern length checking
|
# Stern length checking
|
||||||
@ -70,11 +68,6 @@ MD022:
|
|||||||
# Blank lines below heading
|
# Blank lines below heading
|
||||||
lines_below: 1
|
lines_below: 1
|
||||||
|
|
||||||
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
|
|
||||||
MD024:
|
|
||||||
# Only check sibling headings
|
|
||||||
allow_different_nesting: true
|
|
||||||
|
|
||||||
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
|
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
|
||||||
MD025:
|
MD025:
|
||||||
# Heading level
|
# Heading level
|
||||||
|
19
Dockerfile
19
Dockerfile
@ -1,20 +1,5 @@
|
|||||||
FROM docker.io/library/golang:1.23.4-alpine3.19 AS build
|
FROM scratch AS build
|
||||||
|
|
||||||
RUN apk add git make
|
COPY dcmerge-* /usr/bin/dcmerge
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
ADD ./ /workspace
|
|
||||||
|
|
||||||
RUN make install \
|
|
||||||
DESTDIR=/cache \
|
|
||||||
PREFIX=/usr \
|
|
||||||
VERSION=${VERSION}
|
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.21
|
|
||||||
|
|
||||||
COPY --from=build /cache /
|
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
VOLUME [ "/workspace" ]
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/dcmerge" ]
|
ENTRYPOINT [ "/usr/bin/dcmerge" ]
|
16
Makefile
16
Makefile
@ -26,11 +26,7 @@ DCMERGE_IMAGE_UNQUALIFIED=${DCMERGE_IMAGE_NAMESPACE}/${DCMERGE_IMAGE_NAME}:${DCM
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
dcmerge:
|
dcmerge:
|
||||||
CGO_ENABLED=0 \
|
CGO_ENABLED=0 \
|
||||||
GOPRIVATE=$(shell go env GOPRIVATE) \
|
|
||||||
GOPROXY=$(shell go env GOPROXY) \
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
GONOPROXY=$(shell go env GONOPROXY) \
|
|
||||||
GONOSUMDB=$(shell go env GONOSUMDB) \
|
|
||||||
GOSUMDB=$(shell go env GOSUMDB) \
|
|
||||||
go build -ldflags "-X 'main.version=${VERSION}'" -o ${@} main.go
|
go build -ldflags "-X 'main.version=${VERSION}'" -o ${@} main.go
|
||||||
|
|
||||||
# CLEAN
|
# CLEAN
|
||||||
@ -43,15 +39,21 @@ clean:
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY+=test/unit
|
PHONY+=test/unit
|
||||||
test/unit:
|
test/unit:
|
||||||
go test -v -p 1 -coverprofile=coverage.txt -covermode=count -timeout 1200s ./pkg/...
|
CGO_ENABLED=0 \
|
||||||
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
|
go test -v -p 1 -coverprofile=coverage.txt -covermode=count -timeout 1200s ./pkg/...
|
||||||
|
|
||||||
PHONY+=test/integration
|
PHONY+=test/integration
|
||||||
test/integration:
|
test/integration:
|
||||||
go test -v -p 1 -count=1 -timeout 1200s ./it/...
|
CGO_ENABLED=0 \
|
||||||
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
|
go test -v -p 1 -count=1 -timeout 1200s ./it/...
|
||||||
|
|
||||||
PHONY+=test/coverage
|
PHONY+=test/coverage
|
||||||
test/coverage: test/unit
|
test/coverage: test/unit
|
||||||
go tool cover -html=coverage.txt
|
CGO_ENABLED=0 \
|
||||||
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
|
go tool cover -html=coverage.txt
|
||||||
|
|
||||||
# GOLANGCI-LINT
|
# GOLANGCI-LINT
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# dcmerge
|
# dcmerge
|
||||||
|
|
||||||
[](https://drone.cryptic.systems/volker.raschek/dcmerge)
|
|
||||||
[](https://hub.docker.com/r/volkerraschek/dcmerge)
|
[](https://hub.docker.com/r/volkerraschek/dcmerge)
|
||||||
|
|
||||||
`dcmerge` is a small program to merge docker-compose files from multiple sources. It is available via RPM and docker.
|
`dcmerge` is a small program to merge docker-compose files from multiple sources. It is available via RPM and docker.
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
image: git.cryptic.systems/volker.raschek/dcmerge:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
|
||||||
{{#if build.tags}}
|
|
||||||
tags:
|
|
||||||
{{#each build.tags}}
|
|
||||||
- {{this}}
|
|
||||||
{{/each}}
|
|
||||||
- "latest"
|
|
||||||
{{/if}}
|
|
||||||
manifests:
|
|
||||||
-
|
|
||||||
image: git.cryptic.systems/volker.raschek/dcmerge:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
|
|
||||||
platform:
|
|
||||||
architecture: amd64
|
|
||||||
os: linux
|
|
||||||
-
|
|
||||||
image: git.cryptic.systems/volker.raschek/dcmerge:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
|
|
||||||
platform:
|
|
||||||
architecture: arm64
|
|
||||||
os: linux
|
|
||||||
variant: v8
|
|
@ -531,6 +531,7 @@ func NewSecret() *Secret {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
Command []string `json:"command,omitempty" yaml:"command,omitempty"`
|
||||||
CapabilitiesAdd []string `json:"cap_add,omitempty" yaml:"cap_add,omitempty"`
|
CapabilitiesAdd []string `json:"cap_add,omitempty" yaml:"cap_add,omitempty"`
|
||||||
CapabilitiesDrop []string `json:"cap_drop,omitempty" yaml:"cap_drop,omitempty"`
|
CapabilitiesDrop []string `json:"cap_drop,omitempty" yaml:"cap_drop,omitempty"`
|
||||||
DependsOnContainer *DependsOnContainer `json:"depends_on,omitempty" yaml:"depends_on,omitempty"`
|
DependsOnContainer *DependsOnContainer `json:"depends_on,omitempty" yaml:"depends_on,omitempty"`
|
||||||
@ -641,7 +642,8 @@ func (s *Service) Equal(equalable Equalable) bool {
|
|||||||
case s == nil && service != nil:
|
case s == nil && service != nil:
|
||||||
return false
|
return false
|
||||||
default:
|
default:
|
||||||
return equalSlice(s.CapabilitiesAdd, service.CapabilitiesAdd) &&
|
return equalSlice(s.Command, service.Command) &&
|
||||||
|
equalSlice(s.CapabilitiesAdd, service.CapabilitiesAdd) &&
|
||||||
equalSlice(s.CapabilitiesDrop, service.CapabilitiesDrop) &&
|
equalSlice(s.CapabilitiesDrop, service.CapabilitiesDrop) &&
|
||||||
s.DependsOnContainer.Equal(service.DependsOnContainer) &&
|
s.DependsOnContainer.Equal(service.DependsOnContainer) &&
|
||||||
s.Deploy.Equal(service.Deploy) &&
|
s.Deploy.Equal(service.Deploy) &&
|
||||||
@ -673,6 +675,7 @@ func (s *Service) MergeExistingWin(service *Service) {
|
|||||||
// fallthrough
|
// fallthrough
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
s.mergeExistingWinCommand(service.Command)
|
||||||
s.mergeExistingWinCapabilitiesAdd(service.CapabilitiesAdd)
|
s.mergeExistingWinCapabilitiesAdd(service.CapabilitiesAdd)
|
||||||
s.mergeExistingWinCapabilitiesDrop(service.CapabilitiesDrop)
|
s.mergeExistingWinCapabilitiesDrop(service.CapabilitiesDrop)
|
||||||
s.mergeExistingWinDependsOnContainer(service.DependsOnContainer)
|
s.mergeExistingWinDependsOnContainer(service.DependsOnContainer)
|
||||||
@ -707,6 +710,7 @@ func (s *Service) MergeLastWin(service *Service) {
|
|||||||
// fallthrough
|
// fallthrough
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
s.mergeLastWinCommand(service.Command)
|
||||||
s.mergeLastWinCapabilitiesAdd(service.CapabilitiesAdd)
|
s.mergeLastWinCapabilitiesAdd(service.CapabilitiesAdd)
|
||||||
s.mergeLastWinCapabilitiesDrop(service.CapabilitiesDrop)
|
s.mergeLastWinCapabilitiesDrop(service.CapabilitiesDrop)
|
||||||
s.mergeLastWinDependsOnContainer(service.DependsOnContainer)
|
s.mergeLastWinDependsOnContainer(service.DependsOnContainer)
|
||||||
@ -723,6 +727,13 @@ func (s *Service) MergeLastWin(service *Service) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) mergeExistingWinCommand(command []string) {
|
||||||
|
if len(s.Command) > 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
s.Command = command
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Service) mergeExistingWinCapabilitiesAdd(capabilitiesAdd []string) {
|
func (s *Service) mergeExistingWinCapabilitiesAdd(capabilitiesAdd []string) {
|
||||||
for _, capabilityAdd := range capabilitiesAdd {
|
for _, capabilityAdd := range capabilitiesAdd {
|
||||||
if !existsInSlice(s.CapabilitiesAdd, capabilityAdd) && len(capabilityAdd) > 0 {
|
if !existsInSlice(s.CapabilitiesAdd, capabilityAdd) && len(capabilityAdd) > 0 {
|
||||||
@ -935,6 +946,12 @@ func (s *Service) mergeExistingWinVolumes(volumes []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) mergeLastWinCommand(command []string) {
|
||||||
|
if len(command) > 0 {
|
||||||
|
s.Command = command
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Service) mergeLastWinCapabilitiesAdd(capabilitiesAdd []string) {
|
func (s *Service) mergeLastWinCapabilitiesAdd(capabilitiesAdd []string) {
|
||||||
for _, capabilityAdd := range capabilitiesAdd {
|
for _, capabilityAdd := range capabilitiesAdd {
|
||||||
if len(capabilityAdd) <= 0 {
|
if len(capabilityAdd) <= 0 {
|
||||||
|
@ -301,6 +301,7 @@ func TestService_Equal(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
equalableA: &dockerCompose.Service{
|
equalableA: &dockerCompose.Service{
|
||||||
|
Command: []string{},
|
||||||
CapabilitiesAdd: []string{},
|
CapabilitiesAdd: []string{},
|
||||||
CapabilitiesDrop: []string{},
|
CapabilitiesDrop: []string{},
|
||||||
DependsOnContainer: &dockerCompose.DependsOnContainer{},
|
DependsOnContainer: &dockerCompose.DependsOnContainer{},
|
||||||
@ -316,6 +317,7 @@ func TestService_Equal(t *testing.T) {
|
|||||||
Volumes: []string{},
|
Volumes: []string{},
|
||||||
},
|
},
|
||||||
equalableB: &dockerCompose.Service{
|
equalableB: &dockerCompose.Service{
|
||||||
|
Command: []string{},
|
||||||
CapabilitiesAdd: []string{},
|
CapabilitiesAdd: []string{},
|
||||||
CapabilitiesDrop: []string{},
|
CapabilitiesDrop: []string{},
|
||||||
DependsOnContainer: &dockerCompose.DependsOnContainer{},
|
DependsOnContainer: &dockerCompose.DependsOnContainer{},
|
||||||
@ -332,6 +334,15 @@ func TestService_Equal(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expectedResult: true,
|
expectedResult: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
equalableA: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
equalableB: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
expectedResult: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
equalableA: &dockerCompose.Service{
|
equalableA: &dockerCompose.Service{
|
||||||
CapabilitiesAdd: []string{"NET_ADMIN"},
|
CapabilitiesAdd: []string{"NET_ADMIN"},
|
||||||
@ -636,6 +647,52 @@ func TestService_MergeExistingWin(t *testing.T) {
|
|||||||
expectedService: &dockerCompose.Service{},
|
expectedService: &dockerCompose.Service{},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Command
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{""},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// CapabilitiesAdd
|
// CapabilitiesAdd
|
||||||
{
|
{
|
||||||
serviceDeploymentA: &dockerCompose.Service{
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
@ -1620,6 +1677,52 @@ func TestService_MergeLastWin(t *testing.T) {
|
|||||||
expectedService: &dockerCompose.Service{},
|
expectedService: &dockerCompose.Service{},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Command
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
Command: []string{"/usr/bin/cp", "--recursive", "/tmp/foo.txt", "/tmp/bar.txt"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
Command: []string{""},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
Command: []string{""},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// CapabilitiesAdd
|
// CapabilitiesAdd
|
||||||
{
|
{
|
||||||
serviceDeploymentA: &dockerCompose.Service{
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
command: [ "/usr/bin/cp", "--recursive", "--force", "/tmp/foo.txt", "/tmp/bar.txt" ]
|
||||||
|
image: library/frontend:latest
|
@ -0,0 +1,4 @@
|
|||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
command: [ "/usr/bin/cp", "--recursive", "--force", "/tmp/bar.txt", "/tmp/foo.txt"]
|
||||||
|
image: library/frontend:latest
|
@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
command:
|
||||||
|
- /usr/bin/cp
|
||||||
|
- --recursive
|
||||||
|
- --force
|
||||||
|
- /tmp/foo.txt
|
||||||
|
- /tmp/bar.txt
|
||||||
|
image: library/frontend:latest
|
@ -1,41 +1,10 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"assignees": [ "volker.raschek" ],
|
"extends": [
|
||||||
"labels": [ "renovate" ],
|
"local>volker.raschek/renovate-config:default#master",
|
||||||
"packageRules": [
|
"local>volker.raschek/renovate-config:container#master",
|
||||||
{
|
"local>volker.raschek/renovate-config:actions#master",
|
||||||
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
|
"local>volker.raschek/renovate-config:golang#master",
|
||||||
"automerge": true,
|
"local>volker.raschek/renovate-config:regexp#master"
|
||||||
"matchManagers": "droneci",
|
]
|
||||||
"matchUpdateTypes": [ "minor", "patch"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Automatically update patch version of used container images in docker files",
|
|
||||||
"addLabels": [ "renovate/container-image", "renovate/automerge" ],
|
|
||||||
"automerge": true,
|
|
||||||
"matchBaseBranches": [ "master" ],
|
|
||||||
"matchManagers": [ "dockerfile" ],
|
|
||||||
"matchUpdateTypes": [ "minor", "patch" ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Automatically update minor and patch versions of go modules",
|
|
||||||
"addLabels": [ "renovate/gomod", "renovate/automerge" ],
|
|
||||||
"automerge": true,
|
|
||||||
"matchManagers": [ "gomod" ],
|
|
||||||
"matchUpdateTypes": [ "minor", "patch" ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Disable major update version of go modules",
|
|
||||||
"enabled": false,
|
|
||||||
"matchManagers": [ "gomod" ],
|
|
||||||
"matchPackageNames": [
|
|
||||||
"gopkg.in/yaml.v2"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"postUpdateOptions": [
|
|
||||||
"gomodTidy"
|
|
||||||
],
|
|
||||||
"rebaseLabel": "renovate/rebase",
|
|
||||||
"rebaseWhen": "behind-base-branch"
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user