You've already forked dcmerge
Compare commits
75 Commits
v0.2.0
...
747e46aa18
Author | SHA1 | Date | |
---|---|---|---|
747e46aa18
|
|||
da34769ff3
|
|||
1a9fa39c94
|
|||
554c73bd7b
|
|||
ea0bb14ac4
|
|||
20b4f12dd1
|
|||
f2dc3d5174
|
|||
37de3302c6
|
|||
57dff5ff36
|
|||
f0f5e586d9
|
|||
0cd81642bb
|
|||
e6e3b0d4fc
|
|||
e66b2045f2
|
|||
141779c2a0
|
|||
c2ad246c32
|
|||
e1a7f3b900
|
|||
5417844dcc
|
|||
63030b3523
|
|||
168026c4ac
|
|||
992941abdc
|
|||
e8093e7266
|
|||
a04c5f9606
|
|||
7edd465bc6
|
|||
c62c747551
|
|||
900e5535ed | |||
dc329229e1
|
|||
49b1cfb1fe
|
|||
910172cc94
|
|||
04455e02b4
|
|||
e2c38f76b7
|
|||
4c67cb4198
|
|||
5c3ba383b6
|
|||
bbade1e4f9
|
|||
4085619557
|
|||
a1b8695aae
|
|||
934997b20a
|
|||
702c1ac4b6
|
|||
ea5269027d
|
|||
6ced20b951
|
|||
a6b4fd0afc
|
|||
07288bf752
|
|||
e09eaebfb3
|
|||
6224a9d38f
|
|||
2da0b01a44
|
|||
7628004096 | |||
19f70937e9 | |||
d8e064d873 | |||
7cb4c5634c | |||
86695b62ec | |||
dc861f13b1 | |||
9a3c64e91a | |||
610dd87a4b | |||
165cd6a778 | |||
2f9a7d0dd5 | |||
b83efda648
|
|||
5dea30fec0
|
|||
3d97ee0ab8
|
|||
8b68c9587c
|
|||
669ebd0f25 | |||
8f794494a2 | |||
8e411cc486
|
|||
d7e8970860 | |||
8603eca0b5 | |||
d8ada5578b
|
|||
4f5d115926 | |||
dac3be4e2d | |||
173637693f | |||
3ba641aa12 | |||
768a49319d | |||
66f5fff92a | |||
b6b2e069cd | |||
2c738d0417 | |||
46dd067b48
|
|||
9669685997 | |||
9a76f3432a |
292
.drone.yml
292
.drone.yml
@ -11,12 +11,12 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: markdown lint
|
- name: markdown lint
|
||||||
commands:
|
commands:
|
||||||
- markdownlint *.md
|
- markdownlint *.md
|
||||||
image: git.cryptic.systems/volker.raschek/markdownlint:0.35.0
|
image: git.cryptic.systems/volker.raschek/markdownlint:0.43.0
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 150
|
cpu: 150
|
||||||
@ -34,7 +34,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 150
|
cpu: 150
|
||||||
@ -62,46 +62,18 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: unit-test
|
- name: unit-test
|
||||||
commands:
|
commands:
|
||||||
- go test -v ./...
|
- go test -v ./...
|
||||||
image: docker.io/library/golang:1.21.0
|
image: docker.io/library/golang:1.23.6
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: unit-test-arm-v7
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
platform:
|
|
||||||
arch: arm
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
|
||||||
|
|
||||||
- name: unit-test
|
|
||||||
commands:
|
|
||||||
- go test -v ./...
|
|
||||||
image: docker.io/library/golang:1.21.0
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- pull_request
|
|
||||||
- push
|
|
||||||
exclude:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
@ -115,12 +87,12 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: unit-test
|
- name: unit-test
|
||||||
commands:
|
commands:
|
||||||
- go test -v ./...
|
- go test -v ./...
|
||||||
image: docker.io/library/golang:1.21.0
|
image: docker.io/library/golang:1.23.6
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
@ -148,10 +120,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.io/plugins/docker:20.10.9
|
image: docker.io/plugins/docker:20.18.6
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -181,74 +153,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
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-arm-v7
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- linter
|
|
||||||
- unit-test-arm-v7
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.10.9
|
|
||||||
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-arm-v7
|
|
||||||
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.2
|
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- changed
|
- changed
|
||||||
@ -282,10 +187,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.io/plugins/docker:20.10.9
|
image: docker.io/plugins/docker:20.18.6
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -315,7 +220,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- changed
|
- changed
|
||||||
@ -349,10 +254,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.io/plugins/docker:20.10.9
|
image: docker.io/plugins/docker:20.18.6
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -381,72 +286,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
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-arm-v7
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- linter
|
|
||||||
- unit-test-arm-v7
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.10.9
|
|
||||||
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-arm-v7
|
|
||||||
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.2
|
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- changed
|
- changed
|
||||||
@ -479,10 +319,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.io/plugins/docker:20.10.9
|
image: docker.io/plugins/docker:20.18.6
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -511,7 +351,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- changed
|
- changed
|
||||||
@ -536,7 +376,6 @@ clone:
|
|||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- latest-amd64
|
- latest-amd64
|
||||||
- latest-arm-v7
|
|
||||||
- latest-arm64-v8
|
- latest-arm64-v8
|
||||||
|
|
||||||
# docker.io/plugins/manifest only for amd64 architectures available
|
# docker.io/plugins/manifest only for amd64 architectures available
|
||||||
@ -546,7 +385,7 @@ node_selector:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build-manifest
|
- name: build-manifest
|
||||||
image: docker.io/plugins/manifest:1.4.0
|
image: docker.io/plugins/manifest:1.4.0
|
||||||
@ -571,7 +410,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 150
|
cpu: 150
|
||||||
@ -603,7 +442,7 @@ depends_on:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: latest-sync
|
- name: latest-sync
|
||||||
commands:
|
commands:
|
||||||
@ -617,7 +456,7 @@ steps:
|
|||||||
from_secret: container_image_registry_user
|
from_secret: container_image_registry_user
|
||||||
DEST_CRED_PASSWORD:
|
DEST_CRED_PASSWORD:
|
||||||
from_secret: container_image_registry_password
|
from_secret: container_image_registry_password
|
||||||
image: quay.io/skopeo/stable:v1.13.1
|
image: quay.io/skopeo/stable:v1.17.0
|
||||||
|
|
||||||
- name: email-notification
|
- name: email-notification
|
||||||
environment:
|
environment:
|
||||||
@ -631,7 +470,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 150
|
cpu: 150
|
||||||
@ -664,10 +503,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.io/plugins/docker:20.10.9
|
image: docker.io/plugins/docker:20.18.6
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: amd64
|
auto_tag_suffix: amd64
|
||||||
@ -698,67 +537,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
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-arm-v7
|
|
||||||
|
|
||||||
clone:
|
|
||||||
disable: true
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: clone
|
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker.io/plugins/docker:20.10.9
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: arm-v7
|
|
||||||
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.2
|
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- changed
|
- changed
|
||||||
@ -784,10 +563,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: docker.io/plugins/docker:20.10.9
|
image: docker.io/plugins/docker:20.18.6
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: arm64-v8
|
auto_tag_suffix: arm64-v8
|
||||||
@ -818,7 +597,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- changed
|
- changed
|
||||||
@ -840,7 +619,6 @@ clone:
|
|||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- tagged-amd64
|
- tagged-amd64
|
||||||
- tagged-arm-v7
|
|
||||||
- tagged-arm64-v8
|
- tagged-arm64-v8
|
||||||
|
|
||||||
# docker.io/plugins/manifest only for amd64 architectures available
|
# docker.io/plugins/manifest only for amd64 architectures available
|
||||||
@ -850,7 +628,7 @@ node_selector:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: build-manifest
|
- name: build-manifest
|
||||||
image: docker.io/plugins/manifest:1.4.0
|
image: docker.io/plugins/manifest:1.4.0
|
||||||
@ -875,7 +653,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 150
|
cpu: 150
|
||||||
@ -904,7 +682,7 @@ depends_on:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: git.cryptic.systems/volker.raschek/git:1.2.1
|
image: git.cryptic.systems/volker.raschek/git:1.4.0
|
||||||
|
|
||||||
- name: tagged-sync
|
- name: tagged-sync
|
||||||
commands:
|
commands:
|
||||||
@ -918,7 +696,7 @@ steps:
|
|||||||
from_secret: container_image_registry_user
|
from_secret: container_image_registry_user
|
||||||
DEST_CRED_PASSWORD:
|
DEST_CRED_PASSWORD:
|
||||||
from_secret: container_image_registry_password
|
from_secret: container_image_registry_password
|
||||||
image: quay.io/skopeo/stable:v1.13.1
|
image: quay.io/skopeo/stable:v1.17.0
|
||||||
|
|
||||||
- name: email-notification
|
- name: email-notification
|
||||||
environment:
|
environment:
|
||||||
@ -932,7 +710,7 @@ steps:
|
|||||||
from_secret: smtp_username
|
from_secret: smtp_username
|
||||||
SMTP_PASSWORD:
|
SMTP_PASSWORD:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
image: git.cryptic.systems/volker.raschek/drone-email:0.1.2
|
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 150
|
cpu: 150
|
||||||
|
@ -45,11 +45,11 @@ MD012:
|
|||||||
# MD013/line-length - Line length
|
# MD013/line-length - Line length
|
||||||
MD013:
|
MD013:
|
||||||
# Number of characters
|
# Number of characters
|
||||||
line_length: 80
|
line_length: 120
|
||||||
# Number of characters for headings
|
# Number of characters for headings
|
||||||
heading_line_length: 80
|
heading_line_length: 120
|
||||||
# Number of characters for code blocks
|
# Number of characters for code blocks
|
||||||
code_block_line_length: 80
|
code_block_line_length: 120
|
||||||
# Include code blocks
|
# Include code blocks
|
||||||
code_blocks: false
|
code_blocks: false
|
||||||
# Include tables
|
# Include tables
|
||||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"rewrap.wrappingColumn": 120,
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
FROM docker.io/library/golang:1.21.0-alpine3.18 AS build
|
FROM docker.io/library/golang:1.23.4-alpine3.19 AS build
|
||||||
|
|
||||||
RUN apk add git make
|
RUN apk add git make
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ RUN make install \
|
|||||||
PREFIX=/usr \
|
PREFIX=/usr \
|
||||||
VERSION=${VERSION}
|
VERSION=${VERSION}
|
||||||
|
|
||||||
FROM docker.io/library/alpine:3.18.3
|
FROM docker.io/library/alpine:3.21
|
||||||
|
|
||||||
COPY --from=build /cache /
|
COPY --from=build /cache /
|
||||||
|
|
||||||
|
33
README.md
33
README.md
@ -3,22 +3,18 @@
|
|||||||
[](https://drone.cryptic.systems/volker.raschek/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
|
`dcmerge` is a small program to merge docker-compose files from multiple sources. It is available via RPM and docker.
|
||||||
sources. It is available via RPM and docker.
|
|
||||||
|
|
||||||
The dynamic pattern of a docker-compose file, that for example `environments`
|
The dynamic pattern of a docker-compose file, that for example `environments` can be specified as a string slice or a
|
||||||
can be specified as a string slice or a list of objects is currently not
|
list of objects is currently not supported. `dcmerge` expect a strict pattern layout. The `environments`, `ports` and
|
||||||
supported. `dcmerge` expect a strict pattern layout. The `environments`, `ports`
|
`volumes` must be declared as a slice of strings.
|
||||||
and `volumes` must be declared as a slice of strings.
|
|
||||||
|
|
||||||
Dockercompose file can be read-in from different sources. Currently are the
|
Dockercompose file can be read-in from different sources. Currently are the following sources supported:
|
||||||
following sources supported:
|
|
||||||
|
|
||||||
- File
|
- File
|
||||||
- HTTP/HTTPS
|
- HTTP/HTTPS
|
||||||
|
|
||||||
Furthermore, `dcmerge` support different ways to merge multiple docker-compose
|
Furthermore, `dcmerge` support different ways to merge multiple docker-compose files.
|
||||||
files.
|
|
||||||
|
|
||||||
- The default merge, add missing secrets, services, networks and volumes.
|
- The default merge, add missing secrets, services, networks and volumes.
|
||||||
- The existing-win merge, add and protect existing attributes.
|
- The existing-win merge, add and protect existing attributes.
|
||||||
@ -26,9 +22,8 @@ files.
|
|||||||
|
|
||||||
## default
|
## default
|
||||||
|
|
||||||
Merge only missing secrets, services, networks and volumes without respecting
|
Merge only missing secrets, services, networks and volumes **without respecting their attributes**. For example, when
|
||||||
their attributes. For example, when the service `app` is already declared, it is
|
the service `app` is already declared, it is not possible to add the service `app` twice. The second service will be
|
||||||
not possible to add the service `app` twice. The second service will be
|
|
||||||
completely skipped.
|
completely skipped.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -68,10 +63,9 @@ services:
|
|||||||
|
|
||||||
## existing-win
|
## existing-win
|
||||||
|
|
||||||
The existing-win merge protects existing attributes. For example there are two
|
The existing-win merge protects existing attributes. For example there are two different docker-compose files, but booth
|
||||||
different docker-compose files, but booth has the same environment variable
|
has the same environment variable `CLIENT_SECRET` defined with different values. The first declaration of the attribute
|
||||||
`CLIENT_SECRET` defined with different values. The first declaration of the
|
wins and is for overwriting protected.
|
||||||
attribute wins and is for overwriting protected.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
@ -99,9 +93,8 @@ services:
|
|||||||
|
|
||||||
## last-win
|
## last-win
|
||||||
|
|
||||||
The last-win merge overwrite recursive existing attributes. For example there
|
The last-win merge overwrite recursive existing attributes. For example there are two different docker-compose files,
|
||||||
are two different docker-compose files, but booth has the same environment
|
but booth has the same environment variable `CLIENT_SECRET` defined with different values. The last passed
|
||||||
variable `CLIENT_SECRET` defined with different values. The last passed
|
|
||||||
docker-compose file which contains this environment wins.
|
docker-compose file which contains this environment wins.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
4
go.mod
4
go.mod
@ -3,8 +3,8 @@ module git.cryptic.systems/volker.raschek/dcmerge
|
|||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/spf13/cobra v1.7.0
|
github.com/spf13/cobra v1.8.1
|
||||||
github.com/stretchr/testify v1.8.4
|
github.com/stretchr/testify v1.10.0
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
10
go.sum
10
go.sum
@ -1,4 +1,4 @@
|
|||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||||
@ -6,12 +6,12 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf
|
|||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
|
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
|
||||||
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
|
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
|
@ -12,12 +12,6 @@ manifests:
|
|||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: linux
|
os: linux
|
||||||
-
|
|
||||||
image: git.cryptic.systems/volker.raschek/dcmerge:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm-v7
|
|
||||||
platform:
|
|
||||||
architecture: arm
|
|
||||||
os: linux
|
|
||||||
variant: v7
|
|
||||||
-
|
-
|
||||||
image: git.cryptic.systems/volker.raschek/dcmerge:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
|
image: git.cryptic.systems/volker.raschek/dcmerge:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
|
||||||
platform:
|
platform:
|
||||||
|
@ -66,25 +66,25 @@ func (c *Config) ExistsVolume(name string) bool {
|
|||||||
|
|
||||||
// Merge adds only a missing network, secret, service and volume.
|
// Merge adds only a missing network, secret, service and volume.
|
||||||
func (c *Config) Merge(config *Config) {
|
func (c *Config) Merge(config *Config) {
|
||||||
for name, network := range c.Networks {
|
for name, network := range config.Networks {
|
||||||
if !c.ExistsNetwork(name) {
|
if !c.ExistsNetwork(name) {
|
||||||
c.Networks[name] = network
|
c.Networks[name] = network
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, secret := range c.Secrets {
|
for name, secret := range config.Secrets {
|
||||||
if !c.ExistsSecret(name) {
|
if !c.ExistsSecret(name) {
|
||||||
c.Secrets[name] = secret
|
c.Secrets[name] = secret
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, service := range c.Services {
|
for name, service := range config.Services {
|
||||||
if !c.ExistsService(name) {
|
if !c.ExistsService(name) {
|
||||||
c.Services[name] = service
|
c.Services[name] = service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, volume := range c.Volumes {
|
for name, volume := range config.Volumes {
|
||||||
if !c.ExistsVolume(name) {
|
if !c.ExistsVolume(name) {
|
||||||
c.Volumes[name] = volume
|
c.Volumes[name] = volume
|
||||||
}
|
}
|
||||||
@ -518,6 +518,7 @@ func NewSecret() *Secret {
|
|||||||
type Service struct {
|
type Service struct {
|
||||||
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"`
|
||||||
|
DependsOn []string `json:"depends_on,omitempty" yaml:"depends_on,omitempty"`
|
||||||
Deploy *ServiceDeploy `json:"deploy,omitempty" yaml:"deploy,omitempty"`
|
Deploy *ServiceDeploy `json:"deploy,omitempty" yaml:"deploy,omitempty"`
|
||||||
Environments []string `json:"environment,omitempty" yaml:"environment,omitempty"`
|
Environments []string `json:"environment,omitempty" yaml:"environment,omitempty"`
|
||||||
ExtraHosts []string `json:"extra_hosts,omitempty" yaml:"extra_hosts,omitempty"`
|
ExtraHosts []string `json:"extra_hosts,omitempty" yaml:"extra_hosts,omitempty"`
|
||||||
@ -644,6 +645,7 @@ func (s *Service) Equal(equalable Equalable) bool {
|
|||||||
default:
|
default:
|
||||||
return equalSlice(s.CapabilitiesAdd, service.CapabilitiesAdd) &&
|
return equalSlice(s.CapabilitiesAdd, service.CapabilitiesAdd) &&
|
||||||
equalSlice(s.CapabilitiesDrop, service.CapabilitiesDrop) &&
|
equalSlice(s.CapabilitiesDrop, service.CapabilitiesDrop) &&
|
||||||
|
equalSlice(s.DependsOn, service.DependsOn) &&
|
||||||
s.Deploy.Equal(service.Deploy) &&
|
s.Deploy.Equal(service.Deploy) &&
|
||||||
equalSlice(s.Environments, service.Environments) &&
|
equalSlice(s.Environments, service.Environments) &&
|
||||||
equalSlice(s.ExtraHosts, service.ExtraHosts) &&
|
equalSlice(s.ExtraHosts, service.ExtraHosts) &&
|
||||||
@ -675,6 +677,7 @@ func (s *Service) MergeExistingWin(service *Service) {
|
|||||||
default:
|
default:
|
||||||
s.mergeExistingWinCapabilitiesAdd(service.CapabilitiesAdd)
|
s.mergeExistingWinCapabilitiesAdd(service.CapabilitiesAdd)
|
||||||
s.mergeExistingWinCapabilitiesDrop(service.CapabilitiesDrop)
|
s.mergeExistingWinCapabilitiesDrop(service.CapabilitiesDrop)
|
||||||
|
s.mergeExistingWinDependsOn(service.DependsOn)
|
||||||
s.mergeExistingWinDeploy(service.Deploy)
|
s.mergeExistingWinDeploy(service.Deploy)
|
||||||
s.mergeExistingWinEnvironments(service.Environments)
|
s.mergeExistingWinEnvironments(service.Environments)
|
||||||
s.mergeExistingWinExtraHosts(service.ExtraHosts)
|
s.mergeExistingWinExtraHosts(service.ExtraHosts)
|
||||||
@ -708,6 +711,7 @@ func (s *Service) MergeLastWin(service *Service) {
|
|||||||
default:
|
default:
|
||||||
s.mergeLastWinCapabilitiesAdd(service.CapabilitiesAdd)
|
s.mergeLastWinCapabilitiesAdd(service.CapabilitiesAdd)
|
||||||
s.mergeLastWinCapabilitiesDrop(service.CapabilitiesDrop)
|
s.mergeLastWinCapabilitiesDrop(service.CapabilitiesDrop)
|
||||||
|
s.mergeLastWinDependsOn(service.DependsOn)
|
||||||
s.mergeLastWinDeploy(service.Deploy)
|
s.mergeLastWinDeploy(service.Deploy)
|
||||||
s.mergeLastWinEnvironments(service.Environments)
|
s.mergeLastWinEnvironments(service.Environments)
|
||||||
s.mergeLastWinExtraHosts(service.ExtraHosts)
|
s.mergeLastWinExtraHosts(service.ExtraHosts)
|
||||||
@ -737,6 +741,14 @@ func (s *Service) mergeExistingWinCapabilitiesDrop(capabilitiesDrop []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) mergeExistingWinDependsOn(dependsOn []string) {
|
||||||
|
for _, depOn := range dependsOn {
|
||||||
|
if !existsInSlice(s.DependsOn, depOn) && len(depOn) > 0 {
|
||||||
|
s.DependsOn = append(s.DependsOn, depOn)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Service) mergeExistingWinDeploy(deploy *ServiceDeploy) {
|
func (s *Service) mergeExistingWinDeploy(deploy *ServiceDeploy) {
|
||||||
switch {
|
switch {
|
||||||
case s.Deploy == nil && deploy != nil:
|
case s.Deploy == nil && deploy != nil:
|
||||||
@ -913,12 +925,24 @@ func (s *Service) mergeLastWinCapabilitiesDrop(capabilitiesDrop []string) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if !existsInSlice(s.CapabilitiesAdd, capabilityDrop) {
|
if !existsInSlice(s.CapabilitiesDrop, capabilityDrop) {
|
||||||
s.CapabilitiesDrop = append(s.CapabilitiesDrop, capabilityDrop)
|
s.CapabilitiesDrop = append(s.CapabilitiesDrop, capabilityDrop)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Service) mergeLastWinDependsOn(dependsOn []string) {
|
||||||
|
for _, dep := range dependsOn {
|
||||||
|
if len(dep) <= 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if !existsInSlice(s.DependsOn, dep) {
|
||||||
|
s.DependsOn = append(s.DependsOn, dep)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Service) mergeLastWinDeploy(deploy *ServiceDeploy) {
|
func (s *Service) mergeLastWinDeploy(deploy *ServiceDeploy) {
|
||||||
switch {
|
switch {
|
||||||
case s.Deploy == nil && deploy != nil:
|
case s.Deploy == nil && deploy != nil:
|
||||||
|
@ -225,6 +225,7 @@ func TestService_Equal(t *testing.T) {
|
|||||||
equalableA: &dockerCompose.Service{
|
equalableA: &dockerCompose.Service{
|
||||||
CapabilitiesAdd: []string{},
|
CapabilitiesAdd: []string{},
|
||||||
CapabilitiesDrop: []string{},
|
CapabilitiesDrop: []string{},
|
||||||
|
DependsOn: []string{},
|
||||||
Deploy: nil,
|
Deploy: nil,
|
||||||
Environments: []string{},
|
Environments: []string{},
|
||||||
ExtraHosts: []string{},
|
ExtraHosts: []string{},
|
||||||
@ -239,6 +240,7 @@ func TestService_Equal(t *testing.T) {
|
|||||||
equalableB: &dockerCompose.Service{
|
equalableB: &dockerCompose.Service{
|
||||||
CapabilitiesAdd: []string{},
|
CapabilitiesAdd: []string{},
|
||||||
CapabilitiesDrop: []string{},
|
CapabilitiesDrop: []string{},
|
||||||
|
DependsOn: []string{},
|
||||||
Deploy: nil,
|
Deploy: nil,
|
||||||
Environments: []string{},
|
Environments: []string{},
|
||||||
ExtraHosts: []string{},
|
ExtraHosts: []string{},
|
||||||
@ -288,6 +290,24 @@ func TestService_Equal(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expectedResult: false,
|
expectedResult: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
equalableA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
equalableB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{},
|
||||||
|
},
|
||||||
|
expectedResult: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
equalableA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
equalableB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
expectedResult: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
equalableA: &dockerCompose.Service{
|
equalableA: &dockerCompose.Service{
|
||||||
Deploy: &dockerCompose.ServiceDeploy{},
|
Deploy: &dockerCompose.ServiceDeploy{},
|
||||||
@ -575,6 +595,52 @@ func TestService_MergeExistingWin(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// DependsOn
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{""},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// Deploy
|
// Deploy
|
||||||
{
|
{
|
||||||
serviceDeploymentA: &dockerCompose.Service{
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
@ -1476,6 +1542,52 @@ func TestService_MergeLastWin(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// DependsOn
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
serviceDeploymentB: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{""},
|
||||||
|
},
|
||||||
|
expectedService: &dockerCompose.Service{
|
||||||
|
DependsOn: []string{"app"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// Deploy
|
// Deploy
|
||||||
{
|
{
|
||||||
serviceDeploymentA: &dockerCompose.Service{
|
serviceDeploymentA: &dockerCompose.Service{
|
||||||
|
@ -75,7 +75,7 @@ func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) {
|
|||||||
func readDockerComposeFromFile(name string) (*dockerCompose.Config, error) {
|
func readDockerComposeFromFile(name string) (*dockerCompose.Config, error) {
|
||||||
fileStat, err := os.Stat(name)
|
fileStat, err := os.Stat(name)
|
||||||
switch {
|
switch {
|
||||||
case errors.Is(err, os.ErrNotExist):
|
case err != nil:
|
||||||
return nil, err
|
return nil, err
|
||||||
case fileStat.IsDir():
|
case fileStat.IsDir():
|
||||||
return nil, fmt.Errorf("%w: %s", ErrorPathIsDir, name)
|
return nil, fmt.Errorf("%w: %s", ErrorPathIsDir, name)
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"assignees": [ "volker.raschek" ],
|
"assignees": [ "volker.raschek" ],
|
||||||
"automergeStrategy": "merge-commit",
|
|
||||||
"automergeType": "pr",
|
|
||||||
"labels": [ "renovate" ],
|
"labels": [ "renovate" ],
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
{
|
||||||
@ -17,15 +15,19 @@
|
|||||||
"automerge": true,
|
"automerge": true,
|
||||||
"matchBaseBranches": [ "master" ],
|
"matchBaseBranches": [ "master" ],
|
||||||
"matchManagers": [ "dockerfile" ],
|
"matchManagers": [ "dockerfile" ],
|
||||||
"matchUpdateTypes": [ "patch" ]
|
"matchUpdateTypes": [ "minor", "patch" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"addLabels": [ "renovate/dcmerge", "renovate/automerge" ],
|
"description": "Automatically update minor and patch versions of go modules",
|
||||||
"automerge": false,
|
"addLabels": [ "renovate/gomod", "renovate/automerge" ],
|
||||||
"matchPackageNames": [ "dcmerge" ],
|
"automerge": true,
|
||||||
"matchManagers": [ "regex" ]
|
"matchManagers": [ "gomod" ],
|
||||||
|
"matchUpdateTypes": [ "minor", "patch" ]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"postUpdateOptions": [
|
||||||
|
"gomodTidy"
|
||||||
|
],
|
||||||
"rebaseLabel": "renovate/rebase",
|
"rebaseLabel": "renovate/rebase",
|
||||||
"rebaseWhen": "behind-base-branch"
|
"rebaseWhen": "behind-base-branch"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
version: "3.3"
|
version: "3.3"
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
|
depends_on:
|
||||||
|
- oracle
|
||||||
environment:
|
environment:
|
||||||
- HTTP_PROXY=1.2.3.4:8080
|
- HTTP_PROXY=1.2.3.4:8080
|
||||||
image: repository:version
|
image: repository:version
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
version: "3.3"
|
version: "3.3"
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
- HTTP_PROXY=4.3.2.1:8080
|
- HTTP_PROXY=4.3.2.1:8080
|
||||||
image: repository:version
|
image: repository:version
|
||||||
|
Reference in New Issue
Block a user