You've already forked dcmerge
							
							Compare commits
	
		
			172 Commits
		
	
	
		
			v0.1.0
			...
			0fc9782aab
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						0fc9782aab
	
				 | 
					
					
						|||
| b8e7ad51f5 | |||
| 
						
						
							
						
						64a926ff6c
	
				 | 
					
					
						|||
| 4218c59a41 | |||
| 
						
						
							
						
						d630fc1dd9
	
				 | 
					
					
						|||
| 66b6dd523b | |||
| 
						
						
							
						
						e1f6342764
	
				 | 
					
					
						|||
| 9a7b86774f | |||
| 
						
						
							
						
						d47ea456ba
	
				 | 
					
					
						|||
| 09b1b1e7d2 | |||
| 
						
						
							
						
						dafa93ffa3
	
				 | 
					
					
						|||
| 6bfadcf71f | |||
| 
						
						
							
						
						740a5898f4
	
				 | 
					
					
						|||
| 
						
						
							
						
						027e7ed7ad
	
				 | 
					
					
						|||
| 
						
						
							
						
						b24b4e6a71
	
				 | 
					
					
						|||
| 
						
						
							
						
						c60eb969d0
	
				 | 
					
					
						|||
| 
						
						
							
						
						405f996e19
	
				 | 
					
					
						|||
| f0a9073fa1 | |||
| 
						
						
							
						
						acaee3903c
	
				 | 
					
					
						|||
| ed4609b326 | |||
| 
						
						
							
						
						a032247c59
	
				 | 
					
					
						|||
| 
						
						
							
						
						7ed6fee298
	
				 | 
					
					
						|||
| 
						
						
							
						
						9c256a53c4
	
				 | 
					
					
						|||
| 
						
						
							
						
						a5423dfe4d
	
				 | 
					
					
						|||
| 
						
						
							
						
						9705b468fa
	
				 | 
					
					
						|||
| 
						
						
							
						
						f8a7634e91
	
				 | 
					
					
						|||
| 
						
						
							
						
						96bdc09d14
	
				 | 
					
					
						|||
| 
						
						
							
						
						96447f88b3
	
				 | 
					
					
						|||
| 
						
						
							
						
						8635fd3334
	
				 | 
					
					
						|||
| 
						
						
							
						
						a6da12db45
	
				 | 
					
					
						|||
| 
						
						
							
						
						07067b6b47
	
				 | 
					
					
						|||
| 
						
						
							
						
						b50b9d8f19
	
				 | 
					
					
						|||
| 
						
						
							
						
						445a9b6799
	
				 | 
					
					
						|||
| 
						
						
							
						
						cd521a803b
	
				 | 
					
					
						|||
| 
						
						
							
						
						5c7b14e6cb
	
				 | 
					
					
						|||
| 
						
						
							
						
						fb3af62fc3
	
				 | 
					
					
						|||
| 
						
						
							
						
						e30c7c007f
	
				 | 
					
					
						|||
| 
						
						
							
						
						973e90986c
	
				 | 
					
					
						|||
| 
						
						
							
						
						90a6350a02
	
				 | 
					
					
						|||
| 
						
						
							
						
						89f4f5b0fa
	
				 | 
					
					
						|||
| 
						
						
							
						
						ee1474a506
	
				 | 
					
					
						|||
| 
						
						
							
						
						1d33b165eb
	
				 | 
					
					
						|||
| 
						
						
							
						
						6fb289da71
	
				 | 
					
					
						|||
| 
						
						
							
						
						ed0b94e4b8
	
				 | 
					
					
						|||
| 
						
						
							
						
						5f06edff04
	
				 | 
					
					
						|||
| 
						
						
							
						
						5560d13550
	
				 | 
					
					
						|||
| 
						
						
							
						
						6387e972e3
	
				 | 
					
					
						|||
| 
						
						
							
						
						5eec7fc1a5
	
				 | 
					
					
						|||
| 
						
						
							
						
						0688315658
	
				 | 
					
					
						|||
| 
						
						
							
						
						63a54e130d
	
				 | 
					
					
						|||
| 
						
						
							
						
						ef1c7f25a3
	
				 | 
					
					
						|||
| 
						
						
							
						
						cc9c98b84d
	
				 | 
					
					
						|||
| 
						
						
							
						
						9f29df1311
	
				 | 
					
					
						|||
| 1d8a8d7b76 | |||
| 
						
						
							
						
						3e73692f28
	
				 | 
					
					
						|||
| 7a0c89c8b7 | |||
| 
						
						
							
						
						3c56ae6e5e
	
				 | 
					
					
						|||
| 
						
						
							
						
						ed7622a34f
	
				 | 
					
					
						|||
| 
						
						
							
						
						967c20c638
	
				 | 
					
					
						|||
| 
						
						
							
						
						c23633a385
	
				 | 
					
					
						|||
| 
						
						
							
						
						68db80a05a
	
				 | 
					
					
						|||
| 
						
						
							
						
						6761dbf419
	
				 | 
					
					
						|||
| 
						
						
							
						
						ab282e5173
	
				 | 
					
					
						|||
| 
						
						
							
						
						003db26fe5
	
				 | 
					
					
						|||
| 
						
						
							
						
						f8b4fe9af6
	
				 | 
					
					
						|||
| 
						
						
							
						
						2c91222753
	
				 | 
					
					
						|||
| 
						
						
							
						
						b45f8181aa
	
				 | 
					
					
						|||
| 
						
						
							
						
						13301cb367
	
				 | 
					
					
						|||
| 
						
						
							
						
						0a68b2d8e7
	
				 | 
					
					
						|||
| 
						
						
							
						
						54af4469a4
	
				 | 
					
					
						|||
| 
						
						
							
						
						dc15512229
	
				 | 
					
					
						|||
| 
						
						
							
						
						5fa0991bc2
	
				 | 
					
					
						|||
| 
						
						
							
						
						efb5fba9a9
	
				 | 
					
					
						|||
| 
						
						
							
						
						c8894de28c
	
				 | 
					
					
						|||
| 
						
						
							
						
						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 | |||
| 
						
						
							
						
						751bb810d2
	
				 | 
					
					
						|||
| 
						
						
							
						
						9b469bd8c6
	
				 | 
					
					
						|||
| 
						
						
							
						
						4ad9da6d63
	
				 | 
					
					
						|||
| 
						
						
							
						
						2ea83b7591
	
				 | 
					
					
						|||
| 
						
						
							
						
						6f673e4a72
	
				 | 
					
					
						|||
| 
						
						
							
						
						d9ecf068c9
	
				 | 
					
					
						|||
| 
						
						
							
						
						4c3c6cd5d2
	
				 | 
					
					
						|||
| 
						
						
							
						
						23290fbd5d
	
				 | 
					
					
						|||
| 
						
						
							
						
						07673bfd53
	
				 | 
					
					
						|||
| 
						
						
							
						
						405a0258f1
	
				 | 
					
					
						|||
| 
						
						
							
						
						462299d5cd
	
				 | 
					
					
						|||
| 
						
						
							
						
						6524785871
	
				 | 
					
					
						|||
| 
						
						
							
						
						1207bcfcab
	
				 | 
					
					
						|||
| 
						
						
							
						
						a656dc2db1
	
				 | 
					
					
						|||
| 
						
						
							
						
						14c645dd96
	
				 | 
					
					
						|||
| 7b0109caf4 | |||
| 6bfd49947e | |||
| 04e0d98dde | |||
| 
						
						
							
						
						87ec3349ea
	
				 | 
					
					
						|||
| 
						
						
							
						
						ad1cf8cbef
	
				 | 
					
					
						|||
| 
						
						
							
						
						16f1f5e9da
	
				 | 
					
					
						|||
| 35d35f0b20 | |||
| 0375ccbf69 | |||
| 
						
						
							
						
						ce48d6dd0c
	
				 | 
					
					
						
							
								
								
									
										862
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										862
									
								
								.drone.yml
									
									
									
									
									
								
							@@ -1,862 +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.2.1
 | 
			
		||||
 | 
			
		||||
- name: markdown lint
 | 
			
		||||
  commands:
 | 
			
		||||
  - markdownlint *.md
 | 
			
		||||
  image: git.cryptic.systems/volker.raschek/markdownlint:0.35.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.2
 | 
			
		||||
  resources:
 | 
			
		||||
    limits:
 | 
			
		||||
      cpu: 150
 | 
			
		||||
      memory: 150M
 | 
			
		||||
  when:
 | 
			
		||||
    status:
 | 
			
		||||
    - changed
 | 
			
		||||
    - failure
 | 
			
		||||
 | 
			
		||||
trigger:
 | 
			
		||||
  event:
 | 
			
		||||
    exclude:
 | 
			
		||||
    - tag
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
kind: pipeline
 | 
			
		||||
type: docker
 | 
			
		||||
name: dry-run-amd64
 | 
			
		||||
 | 
			
		||||
clone:
 | 
			
		||||
  disable: true
 | 
			
		||||
 | 
			
		||||
depends_on:
 | 
			
		||||
- linter
 | 
			
		||||
 | 
			
		||||
platform:
 | 
			
		||||
  os: linux
 | 
			
		||||
  arch: amd64
 | 
			
		||||
 | 
			
		||||
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-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.2
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
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:
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
platform:
 | 
			
		||||
  os: linux
 | 
			
		||||
  arch: arm64
 | 
			
		||||
 | 
			
		||||
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-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.2
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
platform:
 | 
			
		||||
  os: linux
 | 
			
		||||
  arch: amd64
 | 
			
		||||
 | 
			
		||||
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-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.2
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
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:
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
platform:
 | 
			
		||||
  os: linux
 | 
			
		||||
  arch: arm64
 | 
			
		||||
 | 
			
		||||
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-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.2
 | 
			
		||||
  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-arm-v7
 | 
			
		||||
- 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.2.1
 | 
			
		||||
 | 
			
		||||
- 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.2
 | 
			
		||||
  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.2.1
 | 
			
		||||
 | 
			
		||||
- 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.13.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.2
 | 
			
		||||
  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.2.1
 | 
			
		||||
 | 
			
		||||
- name: build
 | 
			
		||||
  image: docker.io/plugins/docker:20.10.9
 | 
			
		||||
  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.2
 | 
			
		||||
  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:
 | 
			
		||||
    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.2.1
 | 
			
		||||
 | 
			
		||||
- name: build
 | 
			
		||||
  image: docker.io/plugins/docker:20.10.9
 | 
			
		||||
  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.2
 | 
			
		||||
  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-arm-v7
 | 
			
		||||
- 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.2.1
 | 
			
		||||
 | 
			
		||||
- 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.2
 | 
			
		||||
  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.2.1
 | 
			
		||||
 | 
			
		||||
- 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.13.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.2
 | 
			
		||||
  resources:
 | 
			
		||||
    limits:
 | 
			
		||||
      cpu: 150
 | 
			
		||||
      memory: 150M
 | 
			
		||||
  when:
 | 
			
		||||
    status:
 | 
			
		||||
    - changed
 | 
			
		||||
    - failure
 | 
			
		||||
 | 
			
		||||
trigger:
 | 
			
		||||
  event:
 | 
			
		||||
  - tag
 | 
			
		||||
  repo:
 | 
			
		||||
  - volker.raschek/dcmerge
 | 
			
		||||
							
								
								
									
										29
									
								
								.gitea/workflows/golang-linters.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.gitea/workflows/golang-linters.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
name: "Lint Golang files"
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    types: [ "opened", "reopened", "synchronize" ]
 | 
			
		||||
  push:
 | 
			
		||||
    branches: [ '**' ]
 | 
			
		||||
    tags-ignore: [ '**' ]
 | 
			
		||||
  workflow_dispatch: {}
 | 
			
		||||
 | 
			
		||||
permissions:
 | 
			
		||||
  contents: read
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  golangci:
 | 
			
		||||
    name: "Run golang CI linter"
 | 
			
		||||
    runs-on: ${{ matrix.os }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        go: [ stable ]
 | 
			
		||||
        os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v4.3.0
 | 
			
		||||
    - uses: actions/setup-go@v5.5.0
 | 
			
		||||
      with:
 | 
			
		||||
        go-version: ${{ matrix.go }}
 | 
			
		||||
    - uses: golangci/golangci-lint-action@v8.0.0
 | 
			
		||||
      with:
 | 
			
		||||
        version: v2.4.0 # renovate: datasource=github-releases depName=golangci/golangci-lint
 | 
			
		||||
							
								
								
									
										42
									
								
								.gitea/workflows/golang-tests.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								.gitea/workflows/golang-tests.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
name: "Run Golang tests"
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    types: [ "opened", "reopened", "synchronize" ]
 | 
			
		||||
  push:
 | 
			
		||||
    branches: [ '**' ]
 | 
			
		||||
    tags-ignore: [ '**' ]
 | 
			
		||||
  workflow_dispatch: {}
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  # integration-test:
 | 
			
		||||
  #   name: "Run integration tests"
 | 
			
		||||
  #   runs-on: ${{ matrix.os }}
 | 
			
		||||
  #   strategy:
 | 
			
		||||
  #     matrix:
 | 
			
		||||
  #       go: [ stable ]
 | 
			
		||||
  #       os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
 | 
			
		||||
  #   steps:
 | 
			
		||||
  #   - uses: actions/checkout@v4.3.0
 | 
			
		||||
  #   - uses: actions/setup-go@v5.5.0
 | 
			
		||||
  #     with:
 | 
			
		||||
  #       go-version: ${{ matrix.go }}
 | 
			
		||||
  #   - env:
 | 
			
		||||
  #       GOPROXY: ${{ vars.GOPROXY }}
 | 
			
		||||
  #     run: make test/integration
 | 
			
		||||
 | 
			
		||||
  unit-test:
 | 
			
		||||
    name: "Run unit tests"
 | 
			
		||||
    runs-on: ${{ matrix.os }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        go: [ stable ]
 | 
			
		||||
        os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v4.3.0
 | 
			
		||||
    - uses: actions/setup-go@v5.5.0
 | 
			
		||||
      with:
 | 
			
		||||
        go-version: ${{ matrix.go }}
 | 
			
		||||
    - env:
 | 
			
		||||
        GOPROXY: ${{ vars.GOPROXY }}
 | 
			
		||||
      run: make test/unit
 | 
			
		||||
							
								
								
									
										19
									
								
								.gitea/workflows/markdown-linters.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.gitea/workflows/markdown-linters.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
name: "Lint Markdown files"
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    types: [ "opened", "reopened", "synchronize" ]
 | 
			
		||||
  push:
 | 
			
		||||
    branches: [ '*' ]
 | 
			
		||||
    tags-ignore: [ '*' ]
 | 
			
		||||
  workflow_dispatch: {}
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  markdown-lint:
 | 
			
		||||
    name: "Run markdown linter"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v4.3.0
 | 
			
		||||
    - uses: DavidAnson/markdownlint-cli2-action@v20.0.0
 | 
			
		||||
      with:
 | 
			
		||||
        globs: '**/*.md'
 | 
			
		||||
							
								
								
									
										53
									
								
								.gitea/workflows/release.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								.gitea/workflows/release.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,53 @@
 | 
			
		||||
name: "Release"
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    tags: [ '**' ]
 | 
			
		||||
 | 
			
		||||
permissions:
 | 
			
		||||
  contents: write
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  release:
 | 
			
		||||
    name: "Release application"
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v4.3.0
 | 
			
		||||
    - uses: docker/setup-qemu-action@v3.6.0
 | 
			
		||||
    - uses: actions/setup-go@v5.5.0
 | 
			
		||||
      with:
 | 
			
		||||
        go-version: stable
 | 
			
		||||
    - uses: docker/login-action@v3.5.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.4.0
 | 
			
		||||
      with:
 | 
			
		||||
        version: v2.12.2 # renovate: datasource=github-releases depName=goreleaser/goreleaser
 | 
			
		||||
        args: release --clean
 | 
			
		||||
 | 
			
		||||
  sync-to-hub-docker-io:
 | 
			
		||||
    name: "Upload Images to 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' ]
 | 
			
		||||
  workflow_dispatch: {}
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  update-description-on-hub-docker-io:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v4.3.0
 | 
			
		||||
    - 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
 | 
			
		||||
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1 +1,3 @@
 | 
			
		||||
dcmerge
 | 
			
		||||
dcmerge
 | 
			
		||||
coverage.txt
 | 
			
		||||
dist
 | 
			
		||||
							
								
								
									
										13
									
								
								.golangci.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								.golangci.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
version: "2"
 | 
			
		||||
linters:
 | 
			
		||||
  default: standard
 | 
			
		||||
  enable:
 | 
			
		||||
  - errname
 | 
			
		||||
  - gosec
 | 
			
		||||
 | 
			
		||||
  exclusions:
 | 
			
		||||
    rules: []
 | 
			
		||||
    warn-unused: true
 | 
			
		||||
 | 
			
		||||
run:
 | 
			
		||||
  tests: true
 | 
			
		||||
							
								
								
									
										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
 | 
			
		||||
@@ -45,19 +45,17 @@ MD012:
 | 
			
		||||
# MD013/line-length - Line length
 | 
			
		||||
MD013:
 | 
			
		||||
  # Number of characters
 | 
			
		||||
  line_length: 80
 | 
			
		||||
  line_length: 120
 | 
			
		||||
  # Number of characters for headings
 | 
			
		||||
  heading_line_length: 80
 | 
			
		||||
  heading_line_length: 120
 | 
			
		||||
  # Number of characters for code blocks
 | 
			
		||||
  code_block_line_length: 80
 | 
			
		||||
  code_block_line_length: 120
 | 
			
		||||
  # Include code blocks
 | 
			
		||||
  code_blocks: false
 | 
			
		||||
  # Include tables
 | 
			
		||||
  tables: false
 | 
			
		||||
  # Include headings
 | 
			
		||||
  headings: true
 | 
			
		||||
  # Include headings
 | 
			
		||||
  headers: true
 | 
			
		||||
  # Strict length checking
 | 
			
		||||
  strict: false
 | 
			
		||||
  # Stern length checking
 | 
			
		||||
@@ -70,11 +68,6 @@ MD022:
 | 
			
		||||
  # Blank lines below heading
 | 
			
		||||
  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:
 | 
			
		||||
  # Heading level
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								Dockerfile
									
									
									
									
									
								
							@@ -1,20 +1,5 @@
 | 
			
		||||
FROM docker.io/library/golang:1.20.6-alpine3.18 AS build
 | 
			
		||||
FROM scratch AS build
 | 
			
		||||
 | 
			
		||||
RUN apk add git make
 | 
			
		||||
 | 
			
		||||
WORKDIR /workspace
 | 
			
		||||
ADD ./ /workspace
 | 
			
		||||
 | 
			
		||||
RUN make install \
 | 
			
		||||
      DESTDIR=/cache \
 | 
			
		||||
      PREFIX=/usr \
 | 
			
		||||
      VERSION=${VERSION}
 | 
			
		||||
 | 
			
		||||
FROM docker.io/library/alpine:3.18.2
 | 
			
		||||
 | 
			
		||||
COPY --from=build /cache /
 | 
			
		||||
 | 
			
		||||
WORKDIR /workspace
 | 
			
		||||
VOLUME [ "/workspace" ]
 | 
			
		||||
COPY dcmerge-* /usr/bin/dcmerge
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT [ "/usr/bin/dcmerge" ]
 | 
			
		||||
							
								
								
									
										20
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								Makefile
									
									
									
									
									
								
							@@ -20,17 +20,12 @@ DCMERGE_IMAGE_NAMESPACE?=${DCMERGE_IMAGE_REGISTRY_USER}
 | 
			
		||||
DCMERGE_IMAGE_NAME:=${EXECUTABLE}
 | 
			
		||||
DCMERGE_IMAGE_VERSION?=latest
 | 
			
		||||
DCMERGE_IMAGE_FULLY_QUALIFIED=${DCMERGE_IMAGE_REGISTRY_NAME}/${DCMERGE_IMAGE_NAMESPACE}/${DCMERGE_IMAGE_NAME}:${DCMERGE_IMAGE_VERSION}
 | 
			
		||||
DCMERGE_IMAGE_UNQUALIFIED=${DCMERGE_IMAGE_NAMESPACE}/${DCMERGE_IMAGE_NAME}:${DCMERGE_IMAGE_VERSION}
 | 
			
		||||
 | 
			
		||||
# BIN
 | 
			
		||||
# ==============================================================================
 | 
			
		||||
dcmerge:
 | 
			
		||||
	CGO_ENABLED=0 \
 | 
			
		||||
	GOPRIVATE=$(shell go env GOPRIVATE) \
 | 
			
		||||
	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
 | 
			
		||||
 | 
			
		||||
# CLEAN
 | 
			
		||||
@@ -43,15 +38,21 @@ clean:
 | 
			
		||||
# ==============================================================================
 | 
			
		||||
PHONY+=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
 | 
			
		||||
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
 | 
			
		||||
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
 | 
			
		||||
# ==============================================================================
 | 
			
		||||
@@ -91,14 +92,13 @@ container-image/build:
 | 
			
		||||
		--no-cache \
 | 
			
		||||
		--pull \
 | 
			
		||||
		--tag ${DCMERGE_IMAGE_FULLY_QUALIFIED} \
 | 
			
		||||
		--tag ${DCMERGE_IMAGE_UNQUALIFIED} \
 | 
			
		||||
		.
 | 
			
		||||
 | 
			
		||||
# DELETE CONTAINER IMAGE
 | 
			
		||||
# ==============================================================================
 | 
			
		||||
PHONY:=container-image/delete
 | 
			
		||||
container-image/delete:
 | 
			
		||||
	- ${CONTAINER_RUNTIME} image rm ${DCMERGE_IMAGE_FULLY_QUALIFIED} ${DCMERGE_IMAGE_UNQUALIFIED}
 | 
			
		||||
	- ${CONTAINER_RUNTIME} image rm ${DCMERGE_IMAGE_FULLY_QUALIFIED}
 | 
			
		||||
 | 
			
		||||
# PUSH CONTAINER IMAGE
 | 
			
		||||
# ==============================================================================
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								README.md
									
									
									
									
									
								
							@@ -1,24 +1,19 @@
 | 
			
		||||
# dcmerge
 | 
			
		||||
 | 
			
		||||
[](https://drone.cryptic.systems/volker.raschek/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.
 | 
			
		||||
 | 
			
		||||
The dynamic pattern of a docker-compose file, that for example `environments`
 | 
			
		||||
can be specified as a string slice or a list of objects is currently not
 | 
			
		||||
supported. `dcmerge` expect a strict pattern layout. The `environments`, `ports`
 | 
			
		||||
and `volumes` must be declared as a slice of strings.
 | 
			
		||||
The dynamic pattern of a docker-compose file, that for example `environments` can be specified as a string slice or a
 | 
			
		||||
list of objects is currently not supported. `dcmerge` expect a strict pattern layout. The `environments`, `ports` and
 | 
			
		||||
`volumes` must be declared as a slice of strings.
 | 
			
		||||
 | 
			
		||||
Dockercompose file can be read-in from different sources. Currently are the
 | 
			
		||||
following sources supported:
 | 
			
		||||
Dockercompose file can be read-in from different sources. Currently are the following sources supported:
 | 
			
		||||
 | 
			
		||||
- File
 | 
			
		||||
- HTTP/HTTPS
 | 
			
		||||
 | 
			
		||||
Furthermore, `dcmerge` support different ways to merge multiple docker-compose
 | 
			
		||||
files.
 | 
			
		||||
Furthermore, `dcmerge` support different ways to merge multiple docker-compose files.
 | 
			
		||||
 | 
			
		||||
- The default merge, add missing secrets, services, networks and volumes.
 | 
			
		||||
- The existing-win merge, add and protect existing attributes.
 | 
			
		||||
@@ -26,9 +21,8 @@ files.
 | 
			
		||||
 | 
			
		||||
## default
 | 
			
		||||
 | 
			
		||||
Merge only missing secrets, services, networks and volumes without respecting
 | 
			
		||||
their attributes. For example, when the service `app` is already declared, it is
 | 
			
		||||
not possible to add the service `app` twice. The second service will be
 | 
			
		||||
Merge only missing secrets, services, networks and volumes **without respecting their attributes**. For example, when
 | 
			
		||||
the service `app` is already declared, it is not possible to add the service `app` twice. The second service will be
 | 
			
		||||
completely skipped.
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
@@ -68,10 +62,9 @@ services:
 | 
			
		||||
 | 
			
		||||
## existing-win
 | 
			
		||||
 | 
			
		||||
The existing-win merge protects existing attributes. For example there are two
 | 
			
		||||
different docker-compose files, but booth has the same environment variable
 | 
			
		||||
`CLIENT_SECRET` defined with different values. The first declaration of the
 | 
			
		||||
attribute wins and is for overwriting protected.
 | 
			
		||||
The existing-win merge protects existing attributes. For example there are two different docker-compose files, but booth
 | 
			
		||||
has the same environment variable `CLIENT_SECRET` defined with different values. The first declaration of the attribute
 | 
			
		||||
wins and is for overwriting protected.
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
---
 | 
			
		||||
@@ -99,9 +92,8 @@ services:
 | 
			
		||||
 | 
			
		||||
## last-win
 | 
			
		||||
 | 
			
		||||
The last-win merge overwrite recursive existing attributes. For example there
 | 
			
		||||
are two different docker-compose files, but booth has the same environment
 | 
			
		||||
variable `CLIENT_SECRET` defined with different values. The last passed
 | 
			
		||||
The last-win merge overwrite recursive existing attributes. For example there are two different docker-compose files,
 | 
			
		||||
but booth has the same environment variable `CLIENT_SECRET` defined with different values. The last passed
 | 
			
		||||
docker-compose file which contains this environment wins.
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										39
									
								
								cmd/root.go
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								cmd/root.go
									
									
									
									
									
								
							@@ -8,7 +8,7 @@ import (
 | 
			
		||||
	"git.cryptic.systems/volker.raschek/dcmerge/pkg/domain/dockerCompose"
 | 
			
		||||
	"git.cryptic.systems/volker.raschek/dcmerge/pkg/fetcher"
 | 
			
		||||
	"github.com/spf13/cobra"
 | 
			
		||||
	"gopkg.in/yaml.v2"
 | 
			
		||||
	"gopkg.in/yaml.v3"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func Execute(version string) error {
 | 
			
		||||
@@ -18,17 +18,19 @@ func Execute(version string) error {
 | 
			
		||||
		Long:                  "To load completions",
 | 
			
		||||
		DisableFlagsInUseLine: true,
 | 
			
		||||
		ValidArgs:             []string{"bash", "zsh", "fish", "powershell"},
 | 
			
		||||
		Args:                  cobra.ExactValidArgs(1),
 | 
			
		||||
		Run: func(cmd *cobra.Command, args []string) {
 | 
			
		||||
		Args:                  cobra.MatchAll(cobra.ExactArgs(1)),
 | 
			
		||||
		RunE: func(cmd *cobra.Command, args []string) error {
 | 
			
		||||
			switch args[0] {
 | 
			
		||||
			case "bash":
 | 
			
		||||
				cmd.Root().GenBashCompletion(os.Stdout)
 | 
			
		||||
				return cmd.Root().GenBashCompletion(os.Stdout)
 | 
			
		||||
			case "zsh":
 | 
			
		||||
				cmd.Root().GenZshCompletion(os.Stdout)
 | 
			
		||||
				return cmd.Root().GenZshCompletion(os.Stdout)
 | 
			
		||||
			case "fish":
 | 
			
		||||
				cmd.Root().GenFishCompletion(os.Stdout, true)
 | 
			
		||||
				return cmd.Root().GenFishCompletion(os.Stdout, true)
 | 
			
		||||
			case "powershell":
 | 
			
		||||
				cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout)
 | 
			
		||||
				return cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout)
 | 
			
		||||
			default:
 | 
			
		||||
				return fmt.Errorf("unknown shell: %v", args[0])
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
@@ -42,6 +44,7 @@ dcmerge docker-compose.yml https://git.example.local/user/repo/docker-compose.ym
 | 
			
		||||
		RunE:    run,
 | 
			
		||||
		Version: version,
 | 
			
		||||
	}
 | 
			
		||||
	rootCmd.Flags().BoolP("existing-win", "f", false, "Protect existing attributes")
 | 
			
		||||
	rootCmd.Flags().BoolP("last-win", "l", false, "Overwrite existing attributes")
 | 
			
		||||
	rootCmd.Flags().StringP("output-file", "o", "", "Write instead on stdout into a file")
 | 
			
		||||
	rootCmd.AddCommand(completionCmd)
 | 
			
		||||
@@ -50,14 +53,19 @@ dcmerge docker-compose.yml https://git.example.local/user/repo/docker-compose.ym
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func run(cmd *cobra.Command, args []string) error {
 | 
			
		||||
	mergeExisting, err := cmd.Flags().GetBool("existing-win")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return fmt.Errorf("failed to parse flag last-win: %s", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mergeLastWin, err := cmd.Flags().GetBool("last-win")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return fmt.Errorf("Failed to parse flag last-win: %s", err)
 | 
			
		||||
		return fmt.Errorf("failed to parse flag last-win: %s", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	outputFile, err := cmd.Flags().GetString("output-file")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return fmt.Errorf("Failed to parse flag output-file: %s", err)
 | 
			
		||||
		return fmt.Errorf("failed to parse flag output-file: %s", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	dockerComposeConfig := dockerCompose.NewConfig()
 | 
			
		||||
@@ -69,32 +77,39 @@ func run(cmd *cobra.Command, args []string) error {
 | 
			
		||||
 | 
			
		||||
	for _, config := range dockerComposeConfigs {
 | 
			
		||||
		switch {
 | 
			
		||||
		case mergeLastWin:
 | 
			
		||||
		case mergeExisting && mergeLastWin:
 | 
			
		||||
			return fmt.Errorf("neither --first-win or --last-win can be specified - not booth")
 | 
			
		||||
		case mergeExisting && !mergeLastWin:
 | 
			
		||||
			dockerComposeConfig.MergeExistingWin(config)
 | 
			
		||||
		case !mergeExisting && mergeLastWin:
 | 
			
		||||
			dockerComposeConfig.MergeLastWin(config)
 | 
			
		||||
		default:
 | 
			
		||||
			dockerComposeConfig.Merge(config)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	switch {
 | 
			
		||||
	case len(outputFile) > 0:
 | 
			
		||||
		// #nosec G301
 | 
			
		||||
		err = os.MkdirAll(filepath.Dir(outputFile), 0755)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// #nosec G304
 | 
			
		||||
		f, err := os.Create(outputFile)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
		defer f.Close()
 | 
			
		||||
		defer func() { _ = f.Close() }()
 | 
			
		||||
 | 
			
		||||
		yamlEncoder := yaml.NewEncoder(f)
 | 
			
		||||
		yamlEncoder.SetIndent(2)
 | 
			
		||||
		return yamlEncoder.Encode(dockerComposeConfig)
 | 
			
		||||
 | 
			
		||||
	default:
 | 
			
		||||
		yamlEncoder := yaml.NewEncoder(os.Stdout)
 | 
			
		||||
		yamlEncoder.SetIndent(2)
 | 
			
		||||
		return yamlEncoder.Encode(dockerComposeConfig)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								go.mod
									
									
									
									
									
								
							@@ -3,15 +3,14 @@ module git.cryptic.systems/volker.raschek/dcmerge
 | 
			
		||||
go 1.20
 | 
			
		||||
 | 
			
		||||
require (
 | 
			
		||||
	github.com/spf13/cobra v1.7.0
 | 
			
		||||
	github.com/stretchr/testify v1.8.4
 | 
			
		||||
	gopkg.in/yaml.v2 v2.4.0
 | 
			
		||||
	github.com/spf13/cobra v1.10.1
 | 
			
		||||
	github.com/stretchr/testify v1.11.1
 | 
			
		||||
	gopkg.in/yaml.v3 v3.0.1
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
require (
 | 
			
		||||
	github.com/davecgh/go-spew v1.1.1 // indirect
 | 
			
		||||
	github.com/inconshreveable/mousetrap v1.1.0 // indirect
 | 
			
		||||
	github.com/pmezard/go-difflib v1.0.0 // indirect
 | 
			
		||||
	github.com/spf13/pflag v1.0.5 // indirect
 | 
			
		||||
	gopkg.in/yaml.v3 v3.0.1 // indirect
 | 
			
		||||
	github.com/spf13/pflag v1.0.9 // indirect
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								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.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
 | 
			
		||||
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/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
 | 
			
		||||
@@ -6,15 +6,13 @@ 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/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 | 
			
		||||
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.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
 | 
			
		||||
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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
 | 
			
		||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
 | 
			
		||||
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
 | 
			
		||||
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
 | 
			
		||||
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
 | 
			
		||||
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
 | 
			
		||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
 | 
			
		||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
 | 
			
		||||
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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
 | 
			
		||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 | 
			
		||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 | 
			
		||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.go
									
									
									
									
									
								
							@@ -5,5 +5,5 @@ import "git.cryptic.systems/volker.raschek/dcmerge/cmd"
 | 
			
		||||
var version string
 | 
			
		||||
 | 
			
		||||
func main() {
 | 
			
		||||
	cmd.Execute(version)
 | 
			
		||||
	_ = cmd.Execute(version)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,26 +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}}-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
 | 
			
		||||
    platform:
 | 
			
		||||
      architecture: arm64
 | 
			
		||||
      os: linux
 | 
			
		||||
      variant: v8
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										418
									
								
								pkg/domain/dockerCompose/config_intern_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										418
									
								
								pkg/domain/dockerCompose/config_intern_test.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,418 @@
 | 
			
		||||
package dockerCompose
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func Test_splitStringInPortMapping(t *testing.T) {
 | 
			
		||||
	require := require.New(t)
 | 
			
		||||
 | 
			
		||||
	testCases := []struct {
 | 
			
		||||
		s                string
 | 
			
		||||
		expectedSrc      string
 | 
			
		||||
		expectedDst      string
 | 
			
		||||
		expectedProtocol string
 | 
			
		||||
	}{
 | 
			
		||||
		{
 | 
			
		||||
			s:                "53:53",
 | 
			
		||||
			expectedSrc:      "53",
 | 
			
		||||
			expectedDst:      "53",
 | 
			
		||||
			expectedProtocol: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:                "0.0.0.0:53:53",
 | 
			
		||||
			expectedSrc:      "0.0.0.0:53",
 | 
			
		||||
			expectedDst:      "53",
 | 
			
		||||
			expectedProtocol: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:                "0.0.0.0:53:10.11.12.13:53",
 | 
			
		||||
			expectedSrc:      "0.0.0.0:53",
 | 
			
		||||
			expectedDst:      "10.11.12.13:53",
 | 
			
		||||
			expectedProtocol: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:                "0.0.0.0:53:10.11.12.13:53/tcp",
 | 
			
		||||
			expectedSrc:      "0.0.0.0:53",
 | 
			
		||||
			expectedDst:      "10.11.12.13:53",
 | 
			
		||||
			expectedProtocol: "tcp",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for i, testCase := range testCases {
 | 
			
		||||
		actualSrc, actualDst, actualProtocol := splitStringInPortMapping(testCase.s)
 | 
			
		||||
		require.Equal(testCase.expectedSrc, actualSrc, "TestCase %v", i)
 | 
			
		||||
		require.Equal(testCase.expectedDst, actualDst, "TestCase %v", i)
 | 
			
		||||
		require.Equal(testCase.expectedProtocol, actualProtocol, "TestCase %v", i)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestPort_DstIP(t *testing.T) {
 | 
			
		||||
	require := require.New(t)
 | 
			
		||||
 | 
			
		||||
	testCases := []struct {
 | 
			
		||||
		s              string
 | 
			
		||||
		expectedBool   bool
 | 
			
		||||
		expectedString string
 | 
			
		||||
	}{
 | 
			
		||||
		{
 | 
			
		||||
			s:              "",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/tcp",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/udp",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:0.0.0.0:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "0.0.0.0",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:0.0.0.0:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "0.0.0.0",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:0.0.0.0:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "0.0.0.0",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:10.11.12.13:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "10.11.12.13",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:10.11.12.13:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "10.11.12.13",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:10.11.12.13:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "10.11.12.13",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for i, testCase := range testCases {
 | 
			
		||||
		p := Port(testCase.s)
 | 
			
		||||
		require.Equal(testCase.expectedBool, p.existsDstIP(), "TestCase %v", i)
 | 
			
		||||
		require.Equal(testCase.expectedString, p.getDstIP(), "TestCase %v", i)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestPort_DstPort(t *testing.T) {
 | 
			
		||||
	require := require.New(t)
 | 
			
		||||
 | 
			
		||||
	testCases := []struct {
 | 
			
		||||
		s              string
 | 
			
		||||
		expectedBool   bool
 | 
			
		||||
		expectedString string
 | 
			
		||||
	}{
 | 
			
		||||
		{
 | 
			
		||||
			s:              "",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:0.0.0.0:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:0.0.0.0:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:0.0.0.0:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:10.11.12.13:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:10.11.12.13:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:10.11.12.13:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for i, testCase := range testCases {
 | 
			
		||||
		p := Port(testCase.s)
 | 
			
		||||
		require.Equal(testCase.expectedBool, p.existsDstPort(), "TestCase %v", i)
 | 
			
		||||
		require.Equal(testCase.expectedString, p.getDstPort(), "TestCase %v", i)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestPort_Protocol(t *testing.T) {
 | 
			
		||||
	require := require.New(t)
 | 
			
		||||
 | 
			
		||||
	testCases := []struct {
 | 
			
		||||
		s              string
 | 
			
		||||
		expectedBool   bool
 | 
			
		||||
		expectedString string
 | 
			
		||||
	}{
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53/tcp",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53/udp",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "tcp",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "udp",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "tcp",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "udp",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "tcp",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:11.12.13.14:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "tcp",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:11.12.13.14:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "udp",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for i, testCase := range testCases {
 | 
			
		||||
		p := Port(testCase.s)
 | 
			
		||||
		require.Equal(testCase.expectedBool, p.existsProtocol(), "TestCase %v", i)
 | 
			
		||||
		require.Equal(testCase.expectedString, p.getProtocol(), "TestCase %v", i)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestPort_SrcIP(t *testing.T) {
 | 
			
		||||
	require := require.New(t)
 | 
			
		||||
 | 
			
		||||
	testCases := []struct {
 | 
			
		||||
		s              string
 | 
			
		||||
		expectedBool   bool
 | 
			
		||||
		expectedString string
 | 
			
		||||
	}{
 | 
			
		||||
		{
 | 
			
		||||
			s:              "",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/tcp",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/udp",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "0.0.0.0",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "0.0.0.0",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "0.0.0.0",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "10.11.12.13",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "10.11.12.13",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "10.11.12.13",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for i, testCase := range testCases {
 | 
			
		||||
		p := Port(testCase.s)
 | 
			
		||||
		require.Equal(testCase.expectedBool, p.existsSrcIP(), "TestCase %v", i)
 | 
			
		||||
		require.Equal(testCase.expectedString, p.getSrcIP(), "TestCase %v", i)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestPort_SrcPort(t *testing.T) {
 | 
			
		||||
	require := require.New(t)
 | 
			
		||||
 | 
			
		||||
	testCases := []struct {
 | 
			
		||||
		s              string
 | 
			
		||||
		expectedBool   bool
 | 
			
		||||
		expectedString string
 | 
			
		||||
	}{
 | 
			
		||||
		{
 | 
			
		||||
			s:              "",
 | 
			
		||||
			expectedBool:   false,
 | 
			
		||||
			expectedString: "",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "0.0.0.0:53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53:53",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53:53/tcp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			s:              "10.11.12.13:53:53/udp",
 | 
			
		||||
			expectedBool:   true,
 | 
			
		||||
			expectedString: "53",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for i, testCase := range testCases {
 | 
			
		||||
		p := Port(testCase.s)
 | 
			
		||||
		require.Equal(testCase.expectedBool, p.existsSrcPort(), "TestCase %v", i)
 | 
			
		||||
		require.Equal(testCase.expectedString, p.getSrcPort(), "TestCase %v", i)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -55,8 +55,8 @@ func EqualStringMap[R Equalable](mapA, mapB map[string]R) bool {
 | 
			
		||||
 | 
			
		||||
// ExistsInMap returns true if object of type any exists under the passed name.
 | 
			
		||||
func ExistsInMap[T any](m map[string]T, name string) bool {
 | 
			
		||||
	switch {
 | 
			
		||||
	case m == nil:
 | 
			
		||||
	switch m {
 | 
			
		||||
	case nil:
 | 
			
		||||
		return false
 | 
			
		||||
	default:
 | 
			
		||||
		_, present := m[name]
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,6 @@
 | 
			
		||||
services:
 | 
			
		||||
  frontend:
 | 
			
		||||
    depends_on:
 | 
			
		||||
      backend:
 | 
			
		||||
        condition: service_started
 | 
			
		||||
    image: library/frontend:latest
 | 
			
		||||
@@ -0,0 +1,3 @@
 | 
			
		||||
services:
 | 
			
		||||
  backend:
 | 
			
		||||
    image: library/backend:latest
 | 
			
		||||
@@ -0,0 +1,7 @@
 | 
			
		||||
services:
 | 
			
		||||
  backend:
 | 
			
		||||
    image: library/backend:latest
 | 
			
		||||
  frontend:
 | 
			
		||||
    depends_on:
 | 
			
		||||
    - backend
 | 
			
		||||
    image: library/frontend:latest
 | 
			
		||||
@@ -0,0 +1,5 @@
 | 
			
		||||
services:
 | 
			
		||||
  frontend:
 | 
			
		||||
    depends_on:
 | 
			
		||||
    - backend
 | 
			
		||||
    image: library/frontend:latest
 | 
			
		||||
@@ -0,0 +1,3 @@
 | 
			
		||||
services:
 | 
			
		||||
  backend:
 | 
			
		||||
    image: library/backend:latest
 | 
			
		||||
@@ -0,0 +1,7 @@
 | 
			
		||||
services:
 | 
			
		||||
  backend:
 | 
			
		||||
    image: library/backend:latest
 | 
			
		||||
  frontend:
 | 
			
		||||
    depends_on:
 | 
			
		||||
    - backend
 | 
			
		||||
    image: library/frontend:latest
 | 
			
		||||
@@ -0,0 +1,6 @@
 | 
			
		||||
services:
 | 
			
		||||
  frontend:
 | 
			
		||||
    depends_on:
 | 
			
		||||
      backend:
 | 
			
		||||
        condition: service_completed_successfully
 | 
			
		||||
    image: library/frontend:latest
 | 
			
		||||
@@ -0,0 +1,3 @@
 | 
			
		||||
services:
 | 
			
		||||
  backend:
 | 
			
		||||
    image: library/backend:latest
 | 
			
		||||
@@ -0,0 +1,8 @@
 | 
			
		||||
services:
 | 
			
		||||
  backend:
 | 
			
		||||
    image: library/backend:latest
 | 
			
		||||
  frontend:
 | 
			
		||||
    depends_on:
 | 
			
		||||
      backend:
 | 
			
		||||
        condition: service_completed_successfully
 | 
			
		||||
    image: library/frontend:latest
 | 
			
		||||
@@ -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
 | 
			
		||||
@@ -8,7 +8,7 @@ import (
 | 
			
		||||
	"os"
 | 
			
		||||
 | 
			
		||||
	"git.cryptic.systems/volker.raschek/dcmerge/pkg/domain/dockerCompose"
 | 
			
		||||
	"gopkg.in/yaml.v2"
 | 
			
		||||
	"gopkg.in/yaml.v3"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func Fetch(urls ...string) ([]*dockerCompose.Config, error) {
 | 
			
		||||
@@ -20,15 +20,15 @@ func Fetch(urls ...string) ([]*dockerCompose.Config, error) {
 | 
			
		||||
			return nil, err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		switch {
 | 
			
		||||
		case dockerComposeURL.Scheme == "http" || dockerComposeURL.Scheme == "https":
 | 
			
		||||
		switch dockerComposeURL.Scheme {
 | 
			
		||||
		case "http", "https":
 | 
			
		||||
			dockerComposeConfig, err := getDockerComposeViaHTTP(dockerComposeURL.String())
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return nil, err
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			dockerComposeConfigs = append(dockerComposeConfigs, dockerComposeConfig)
 | 
			
		||||
		case dockerComposeURL.Scheme == "file":
 | 
			
		||||
		case "file":
 | 
			
		||||
			fallthrough
 | 
			
		||||
		default:
 | 
			
		||||
			dockerComposeConfig, err := readDockerComposeFromFile(dockerComposeURL.Path)
 | 
			
		||||
@@ -43,7 +43,7 @@ func Fetch(urls ...string) ([]*dockerCompose.Config, error) {
 | 
			
		||||
	return dockerComposeConfigs, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var ErrorPathIsDir error = errors.New("Path is a directory")
 | 
			
		||||
var ErrPathIsDir error = errors.New("path is a directory")
 | 
			
		||||
 | 
			
		||||
func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) {
 | 
			
		||||
	req, err := http.NewRequest(http.MethodGet, url, nil)
 | 
			
		||||
@@ -55,10 +55,10 @@ func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) {
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	defer resp.Body.Close()
 | 
			
		||||
	defer func() { _ = resp.Body.Close() }()
 | 
			
		||||
 | 
			
		||||
	if resp.StatusCode != http.StatusOK {
 | 
			
		||||
		return nil, fmt.Errorf("Received unexpected HTTP-Statuscode %v", resp.StatusCode)
 | 
			
		||||
		return nil, fmt.Errorf("received unexpected HTTP-Statuscode %v", resp.StatusCode)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	dockerCompose := dockerCompose.NewConfig()
 | 
			
		||||
@@ -75,17 +75,18 @@ func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) {
 | 
			
		||||
func readDockerComposeFromFile(name string) (*dockerCompose.Config, error) {
 | 
			
		||||
	fileStat, err := os.Stat(name)
 | 
			
		||||
	switch {
 | 
			
		||||
	case errors.Is(err, os.ErrNotExist):
 | 
			
		||||
	case err != nil:
 | 
			
		||||
		return nil, err
 | 
			
		||||
	case fileStat.IsDir():
 | 
			
		||||
		return nil, fmt.Errorf("%w: %s", ErrorPathIsDir, name)
 | 
			
		||||
		return nil, fmt.Errorf("%w: %s", ErrPathIsDir, name)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// #nosec G304
 | 
			
		||||
	file, err := os.Open(name)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	defer file.Close()
 | 
			
		||||
	defer func() { _ = file.Close() }()
 | 
			
		||||
 | 
			
		||||
	dockerCompose := dockerCompose.NewConfig()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,31 +1,10 @@
 | 
			
		||||
{
 | 
			
		||||
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
 | 
			
		||||
  "assignees": [ "volker.raschek" ],
 | 
			
		||||
  "automergeStrategy": "merge-commit",
 | 
			
		||||
  "automergeType": "pr",
 | 
			
		||||
  "labels": [ "renovate" ],
 | 
			
		||||
  "packageRules": [
 | 
			
		||||
    {
 | 
			
		||||
      "addLabels": [ "renovate/droneci", "renovate/automerge" ],
 | 
			
		||||
      "automerge": true,
 | 
			
		||||
      "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": [ "patch" ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "addLabels": [ "renovate/dcmerge", "renovate/automerge" ],
 | 
			
		||||
      "automerge": false,
 | 
			
		||||
      "matchPackageNames": [ "dcmerge" ],
 | 
			
		||||
      "matchManagers": [ "regex" ]
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "rebaseLabel": "renovate/rebase",
 | 
			
		||||
  "rebaseWhen": "behind-base-branch"
 | 
			
		||||
  "extends": [
 | 
			
		||||
    "local>volker.raschek/renovate-config:default#master",
 | 
			
		||||
    "local>volker.raschek/renovate-config:container#master",
 | 
			
		||||
    "local>volker.raschek/renovate-config:actions#master",
 | 
			
		||||
    "local>volker.raschek/renovate-config:golang#master",
 | 
			
		||||
    "local>volker.raschek/renovate-config:regexp#master"
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								test/assets/docker-compose-a.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								test/assets/docker-compose-a.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
version: "3.3"
 | 
			
		||||
services:
 | 
			
		||||
  app:
 | 
			
		||||
    depends_on:
 | 
			
		||||
    - oracle
 | 
			
		||||
    environment:
 | 
			
		||||
    - HTTP_PROXY=1.2.3.4:8080
 | 
			
		||||
    image: repository:version
 | 
			
		||||
    ports:
 | 
			
		||||
    - 8080:80
 | 
			
		||||
    volumes:
 | 
			
		||||
    - /etc/localtime:/etc/localtime
 | 
			
		||||
							
								
								
									
										12
									
								
								test/assets/docker-compose-b.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								test/assets/docker-compose-b.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
version: "3.3"
 | 
			
		||||
services:
 | 
			
		||||
  app:
 | 
			
		||||
    depends_on:
 | 
			
		||||
    - postgres
 | 
			
		||||
    environment:
 | 
			
		||||
    - HTTP_PROXY=4.3.2.1:8080
 | 
			
		||||
    image: repository:version
 | 
			
		||||
    ports:
 | 
			
		||||
    - 10080:80
 | 
			
		||||
    volumes:
 | 
			
		||||
    - /usr/share/zoneinfo/UTC:/etc/localtime
 | 
			
		||||
		Reference in New Issue
	
	Block a user