You've already forked drone-email
							
							Compare commits
	
		
			45 Commits
		
	
	
		
			daa53a7c8c
			...
			renovate/g
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 5a4c8c21b6 | |||
| c84b7ee9ba | |||
| 0ee4bf0ff4 | |||
| 909d70a1a8 | |||
| a619bc095b | |||
| c40be3b41a | |||
| 601cddd838 | |||
| de1b1b888d | |||
| d20da47a95 | |||
| 71de520efd | |||
| 647291b5dd | |||
| b016fe5903 | |||
| 4a14e62923 | |||
| e866ee8323 | |||
| a3884a033c | |||
| 55b2b211a5 | |||
| 6b0e6f20c5 | |||
| 4f68d1b45f | |||
| aa342b0c09 | |||
| 0fcafda9b1 | |||
| d2ea4b39e9 | |||
| e5715060f4 | |||
| 53e33758bd | |||
| a579612ec5 | |||
| 1d3e64f946 | |||
| 42323ca07c | |||
| 1cc0e0a074 | |||
| b1db5cc338 | |||
| 87be3fe43e | |||
| 1d444f1d0d | |||
| bd21da5b8f | |||
| a281e1cf99 | |||
| 80f9be45dd | |||
| 80616dc468 | |||
| 9b44a755db | |||
| f856cd523a | |||
| e03fa43d91 | |||
| 7d24680bbd | |||
| 84595b4d6a | |||
| 159c4f0dc8 | |||
| e947dcdd7f | |||
| 3db9427be3 | |||
| dce11e0889 | |||
| 2077576f76 | |||
| 6a301bbfa5 | 
							
								
								
									
										660
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										660
									
								
								.drone.yml
									
									
									
									
									
								
							| @@ -1,660 +0,0 @@ | |||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: kubernetes |  | ||||||
| name: linter |  | ||||||
|  |  | ||||||
| clone: |  | ||||||
|   disable: true |  | ||||||
|  |  | ||||||
| platform: |  | ||||||
|   os: linux |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
| - name: clone |  | ||||||
|   image: git.cryptic.systems/volker.raschek/git:1.4.0 |  | ||||||
|  |  | ||||||
| - name: markdown lint |  | ||||||
|   commands: |  | ||||||
|   - markdownlint *.md |  | ||||||
|   image: git.cryptic.systems/volker.raschek/markdownlint:0.44.0 |  | ||||||
|   resources: |  | ||||||
|     limits: |  | ||||||
|       cpu: 150 |  | ||||||
|       memory: 150M |  | ||||||
|  |  | ||||||
| - name: email-notification |  | ||||||
|   environment: |  | ||||||
|     SMTP_FROM_ADDRESS: |  | ||||||
|       from_secret: smtp_from_address |  | ||||||
|     SMTP_FROM_NAME: |  | ||||||
|       from_secret: smtp_from_name |  | ||||||
|     SMTP_HOST: |  | ||||||
|       from_secret: smtp_host |  | ||||||
|     SMTP_USERNAME: |  | ||||||
|       from_secret: smtp_username |  | ||||||
|     SMTP_PASSWORD: |  | ||||||
|       from_secret: smtp_password |  | ||||||
|   image: git.cryptic.systems/volker.raschek/drone-email:0.1.5 |  | ||||||
|   resources: |  | ||||||
|     limits: |  | ||||||
|       cpu: 150 |  | ||||||
|       memory: 150M |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   event: |  | ||||||
|     exclude: |  | ||||||
|     - tag |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: docker |  | ||||||
| name: 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.4.0 |  | ||||||
|  |  | ||||||
| - name: build |  | ||||||
|   image: docker.io/plugins/docker:20.18.8 |  | ||||||
|   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/drone-email |  | ||||||
|     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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   branch: |  | ||||||
|     exclude: |  | ||||||
|     - master |  | ||||||
|   event: |  | ||||||
|   - pull_request |  | ||||||
|   - push |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| 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.4.0 |  | ||||||
|  |  | ||||||
| - name: build |  | ||||||
|   image: docker.io/plugins/docker:20.18.8 |  | ||||||
|   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/drone-email |  | ||||||
|     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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   branch: |  | ||||||
|     exclude: |  | ||||||
|     - master |  | ||||||
|   event: |  | ||||||
|   - pull_request |  | ||||||
|   - push |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| 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.4.0 |  | ||||||
|  |  | ||||||
| - name: build |  | ||||||
|   image: docker.io/plugins/docker:20.18.8 |  | ||||||
|   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/drone-email |  | ||||||
|     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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   branch: |  | ||||||
|   - master |  | ||||||
|   event: |  | ||||||
|   - cron |  | ||||||
|   - push |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| 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.4.0 |  | ||||||
|  |  | ||||||
| - name: build |  | ||||||
|   image: docker.io/plugins/docker:20.18.8 |  | ||||||
|   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/drone-email |  | ||||||
|     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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   branch: |  | ||||||
|   - master |  | ||||||
|   event: |  | ||||||
|   - cron |  | ||||||
|   - push |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: kubernetes |  | ||||||
| name: latest-manifest |  | ||||||
|  |  | ||||||
| clone: |  | ||||||
|   disable: true |  | ||||||
|  |  | ||||||
| depends_on: |  | ||||||
| - latest-amd64 |  | ||||||
| - latest-arm64-v8 |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
| - name: clone |  | ||||||
|   image: git.cryptic.systems/volker.raschek/git:1.4.0 |  | ||||||
|  |  | ||||||
| - name: build-manifest |  | ||||||
|   image: docker.io/plugins/manifest:latest |  | ||||||
|   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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   resources: |  | ||||||
|     limits: |  | ||||||
|       cpu: 150 |  | ||||||
|       memory: 150M |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   branch: |  | ||||||
|   - master |  | ||||||
|   event: |  | ||||||
|   - cron |  | ||||||
|   - push |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: kubernetes |  | ||||||
| name: latest-sync |  | ||||||
|  |  | ||||||
| clone: |  | ||||||
|   disable: true |  | ||||||
|  |  | ||||||
| depends_on: |  | ||||||
| - latest-manifest |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
| - name: clone |  | ||||||
|   image: git.cryptic.systems/volker.raschek/git:1.4.0 |  | ||||||
|  |  | ||||||
| - name: latest-sync |  | ||||||
|   commands: |  | ||||||
|   - skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/drone-email docker.io/volkerraschek |  | ||||||
|   environment: |  | ||||||
|     SRC_CRED_USERNAME: |  | ||||||
|       from_secret: git_cryptic_systems_container_registry_user |  | ||||||
|     SRC_CRED_PASSWORD: |  | ||||||
|       from_secret: git_cryptic_systems_container_registry_password |  | ||||||
|     DEST_CRED_USERNAME: |  | ||||||
|       from_secret: container_image_registry_user |  | ||||||
|     DEST_CRED_PASSWORD: |  | ||||||
|       from_secret: container_image_registry_password |  | ||||||
|   image: quay.io/skopeo/stable:v1.18.0 |  | ||||||
|  |  | ||||||
| - name: email-notification |  | ||||||
|   environment: |  | ||||||
|     SMTP_FROM_ADDRESS: |  | ||||||
|       from_secret: smtp_from_address |  | ||||||
|     SMTP_FROM_NAME: |  | ||||||
|       from_secret: smtp_from_name |  | ||||||
|     SMTP_HOST: |  | ||||||
|       from_secret: smtp_host |  | ||||||
|     SMTP_USERNAME: |  | ||||||
|       from_secret: smtp_username |  | ||||||
|     SMTP_PASSWORD: |  | ||||||
|       from_secret: smtp_password |  | ||||||
|   image: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   resources: |  | ||||||
|     limits: |  | ||||||
|       cpu: 150 |  | ||||||
|       memory: 150M |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   branch: |  | ||||||
|   - master |  | ||||||
|   event: |  | ||||||
|   - cron |  | ||||||
|   - push |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: docker |  | ||||||
| name: tagged-amd64 |  | ||||||
|  |  | ||||||
| clone: |  | ||||||
|   disable: true |  | ||||||
|  |  | ||||||
| platform: |  | ||||||
|   os: linux |  | ||||||
|   arch: amd64 |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
| - name: clone |  | ||||||
|   image: git.cryptic.systems/volker.raschek/git:1.4.0 |  | ||||||
|  |  | ||||||
| - name: build |  | ||||||
|   image: docker.io/plugins/docker:20.18.8 |  | ||||||
|   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/drone-email |  | ||||||
|     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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   event: |  | ||||||
|   - tag |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: docker |  | ||||||
| name: tagged-arm64-v8 |  | ||||||
|  |  | ||||||
| clone: |  | ||||||
|   disable: true |  | ||||||
|  |  | ||||||
| platform: |  | ||||||
|   os: linux |  | ||||||
|   arch: arm64 |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
| - name: clone |  | ||||||
|   image: git.cryptic.systems/volker.raschek/git:1.4.0 |  | ||||||
|  |  | ||||||
| - name: build |  | ||||||
|   image: docker.io/plugins/docker:20.18.8 |  | ||||||
|   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/drone-email |  | ||||||
|     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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   event: |  | ||||||
|   - tag |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: kubernetes |  | ||||||
| name: tagged-manifest |  | ||||||
|  |  | ||||||
| clone: |  | ||||||
|   disable: true |  | ||||||
|  |  | ||||||
| depends_on: |  | ||||||
| - tagged-amd64 |  | ||||||
| - tagged-arm64-v8 |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
| - name: clone |  | ||||||
|   image: git.cryptic.systems/volker.raschek/git:1.4.0 |  | ||||||
|  |  | ||||||
| - name: build-manifest |  | ||||||
|   image: docker.io/plugins/manifest:latest |  | ||||||
|   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: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   resources: |  | ||||||
|     limits: |  | ||||||
|       cpu: 150 |  | ||||||
|       memory: 150M |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   event: |  | ||||||
|   - tag |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| kind: pipeline |  | ||||||
| type: kubernetes |  | ||||||
| name: tagged-sync |  | ||||||
|  |  | ||||||
| clone: |  | ||||||
|   disable: true |  | ||||||
|  |  | ||||||
| depends_on: |  | ||||||
| - tagged-manifest |  | ||||||
|  |  | ||||||
| steps: |  | ||||||
| - name: clone |  | ||||||
|   image: git.cryptic.systems/volker.raschek/git:1.4.0 |  | ||||||
|  |  | ||||||
| - name: tagged-sync |  | ||||||
|   commands: |  | ||||||
|   - skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/drone-email docker.io/volkerraschek |  | ||||||
|   environment: |  | ||||||
|     SRC_CRED_USERNAME: |  | ||||||
|       from_secret: git_cryptic_systems_container_registry_user |  | ||||||
|     SRC_CRED_PASSWORD: |  | ||||||
|       from_secret: git_cryptic_systems_container_registry_password |  | ||||||
|     DEST_CRED_USERNAME: |  | ||||||
|       from_secret: container_image_registry_user |  | ||||||
|     DEST_CRED_PASSWORD: |  | ||||||
|       from_secret: container_image_registry_password |  | ||||||
|   image: quay.io/skopeo/stable:v1.18.0 |  | ||||||
|  |  | ||||||
| - name: email-notification |  | ||||||
|   environment: |  | ||||||
|     SMTP_FROM_ADDRESS: |  | ||||||
|       from_secret: smtp_from_address |  | ||||||
|     SMTP_FROM_NAME: |  | ||||||
|       from_secret: smtp_from_name |  | ||||||
|     SMTP_HOST: |  | ||||||
|       from_secret: smtp_host |  | ||||||
|     SMTP_USERNAME: |  | ||||||
|       from_secret: smtp_username |  | ||||||
|     SMTP_PASSWORD: |  | ||||||
|       from_secret: smtp_password |  | ||||||
|   image: docker.io/volkerraschek/drone-email:0.1.5 |  | ||||||
|   resources: |  | ||||||
|     limits: |  | ||||||
|       cpu: 150 |  | ||||||
|       memory: 150M |  | ||||||
|   when: |  | ||||||
|     status: |  | ||||||
|     - changed |  | ||||||
|     - failure |  | ||||||
|  |  | ||||||
| trigger: |  | ||||||
|   event: |  | ||||||
|   - tag |  | ||||||
|   repo: |  | ||||||
|   - volker.raschek/drone-email |  | ||||||
							
								
								
									
										13
									
								
								.editorconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								.editorconfig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | # Editor configuration, see http://editorconfig.org | ||||||
|  | root = true | ||||||
|  |  | ||||||
|  | [*] | ||||||
|  | charset = utf-8 | ||||||
|  | end_of_line = lf | ||||||
|  | indent_size = 2 | ||||||
|  | indent_style = space | ||||||
|  | insert_final_newline = false | ||||||
|  | trim_trailing_whitespace = true | ||||||
|  |  | ||||||
|  | [{Makefile,*.go}] | ||||||
|  | indent_style = tab | ||||||
							
								
								
									
										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@v5.0.0 | ||||||
|  |     - uses: actions/setup-go@v6.0.0 | ||||||
|  |       with: | ||||||
|  |         go-version: ${{ matrix.go }} | ||||||
|  |     - uses: golangci/golangci-lint-action@v8.0.0 | ||||||
|  |       with: | ||||||
|  |         version: v2.6.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@v5.0.0 | ||||||
|  |     - uses: actions/setup-go@v6.0.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@v5.0.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@v5.0.0 | ||||||
|  |     - uses: docker/setup-qemu-action@v3.6.0 | ||||||
|  |     - uses: actions/setup-go@v6.0.0 | ||||||
|  |       with: | ||||||
|  |         go-version: stable | ||||||
|  |     - uses: docker/login-action@v3.6.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.7 # 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/drone-email:${TAG} | ||||||
							
								
								
									
										20
									
								
								.gitea/workflows/update-docker-hub-description.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								.gitea/workflows/update-docker-hub-description.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | |||||||
|  | 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@v5.0.0 | ||||||
|  |     - uses: peter-evans/dockerhub-description@v5.0.0 | ||||||
|  |       with: | ||||||
|  |         username: ${{ secrets.DOCKER_IO_USERNAME }} | ||||||
|  |         password: ${{ secrets.DOCKER_IO_PASSWORD }} | ||||||
|  |         repository: volkerraschek/drone-email | ||||||
|  |         readme-filepath: README.md | ||||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,3 +1,4 @@ | |||||||
|  | dist | ||||||
| drone-email* | drone-email* | ||||||
| config.yaml | config.yaml | ||||||
| container-test.sh | container-test.sh | ||||||
|   | |||||||
							
								
								
									
										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 | ||||||
| @@ -1,42 +0,0 @@ | |||||||
| run: |  | ||||||
|   skip-dirs: |  | ||||||
|   - it |  | ||||||
|   timeout: 10m |  | ||||||
|   tests: true |  | ||||||
|  |  | ||||||
| linters: |  | ||||||
|   disable-all: true |  | ||||||
|   enable: |  | ||||||
|   # Default |  | ||||||
|   - deadcode |  | ||||||
|   - errcheck |  | ||||||
|   - gosimple |  | ||||||
|   - govet |  | ||||||
|   - ineffassign |  | ||||||
|   - staticcheck |  | ||||||
|   - structcheck |  | ||||||
|   - typecheck |  | ||||||
|   - unused |  | ||||||
|   - varcheck |  | ||||||
|  |  | ||||||
|   # Additionally linters |  | ||||||
|   - containedctx |  | ||||||
|   - decorder |  | ||||||
|   - errname |  | ||||||
|   - gosec |  | ||||||
|   - ireturn |  | ||||||
|   - makezero |  | ||||||
|   - misspell |  | ||||||
|   - unparam |  | ||||||
|   - whitespace |  | ||||||
|   - wrapcheck |  | ||||||
|  |  | ||||||
| linters-settings: |  | ||||||
|   # https://golangci-lint.run/usage/linters/#ireturn |  | ||||||
|   ireturn: |  | ||||||
|     allow: |  | ||||||
|     - anon |  | ||||||
|     - error |  | ||||||
|     - empty |  | ||||||
|     - stdlib |  | ||||||
|     - github.com\/dedalus-cis4u\/proxy\/t1k\/test\/scheme\.Database |  | ||||||
							
								
								
									
										175
									
								
								.goreleaser.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										175
									
								
								.goreleaser.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,175 @@ | |||||||
|  | project_name: drone-email | ||||||
|  |  | ||||||
|  | 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/line-length - Line length | ||||||
| MD013: | MD013: | ||||||
|   # Number of characters |   # Number of characters | ||||||
|   line_length: 80 |   line_length: 120 | ||||||
|   # Number of characters for headings |   # Number of characters for headings | ||||||
|   heading_line_length: 80 |   heading_line_length: 120 | ||||||
|   # Number of characters for code blocks |   # Number of characters for code blocks | ||||||
|   code_block_line_length: 80 |   code_block_line_length: 120 | ||||||
|   # Include code blocks |   # Include code blocks | ||||||
|   code_blocks: false |   code_blocks: false | ||||||
|   # Include tables |   # Include tables | ||||||
|   tables: false |   tables: false | ||||||
|   # Include headings |   # Include headings | ||||||
|   headings: true |   headings: true | ||||||
|   # Include headings |  | ||||||
|   headers: true |  | ||||||
|   # Strict length checking |   # Strict length checking | ||||||
|   strict: false |   strict: false | ||||||
|   # Stern length checking |   # Stern length checking | ||||||
| @@ -70,11 +68,6 @@ MD022: | |||||||
|   # Blank lines below heading |   # Blank lines below heading | ||||||
|   lines_below: 1 |   lines_below: 1 | ||||||
|  |  | ||||||
| # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content |  | ||||||
| MD024: |  | ||||||
|   # Only check sibling headings |  | ||||||
|   allow_different_nesting: true |  | ||||||
|  |  | ||||||
| # MD025/single-title/single-h1 - Multiple top-level headings in the same document | # MD025/single-title/single-h1 - Multiple top-level headings in the same document | ||||||
| MD025: | MD025: | ||||||
|   # Heading level |   # Heading level | ||||||
| @@ -128,8 +121,7 @@ MD041: | |||||||
| # MD044/proper-names - Proper names should have the correct capitalization | # MD044/proper-names - Proper names should have the correct capitalization | ||||||
| MD044: | MD044: | ||||||
|   # List of proper names |   # List of proper names | ||||||
|   names: |   names: [] | ||||||
|   - Gitea |  | ||||||
|   # Include code blocks |   # Include code blocks | ||||||
|   code_blocks: false |   code_blocks: false | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										25
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -1,26 +1,5 @@ | |||||||
| FROM docker.io/library/golang:1.24.1-alpine3.21 AS build | FROM scratch AS build | ||||||
|  |  | ||||||
| ARG GONOPROXY | COPY drone-email-* /usr/bin/drone-email | ||||||
| ARG GONOSUMDB |  | ||||||
| ARG GOPRIVATE |  | ||||||
| ARG GOPROXY |  | ||||||
| ARG VERSION |  | ||||||
|  |  | ||||||
| COPY . /workspace |  | ||||||
|  |  | ||||||
| WORKDIR /workspace |  | ||||||
|  |  | ||||||
| RUN set -ex && \ |  | ||||||
|     apk update && \ |  | ||||||
|     apk add git make && \ |  | ||||||
|     make install DESTDIR=/drone-email PREFIX=/usr VERSION=${VERSION} |  | ||||||
|  |  | ||||||
| ############################################################################### |  | ||||||
|  |  | ||||||
| FROM docker.io/library/alpine:3.21 |  | ||||||
|  |  | ||||||
| RUN apk add --no-cache bash bash-completion ca-certificates tzdata |  | ||||||
|  |  | ||||||
| COPY --from=build /drone-email / |  | ||||||
|  |  | ||||||
| ENTRYPOINT [ "/usr/bin/drone-email" ] | ENTRYPOINT [ "/usr/bin/drone-email" ] | ||||||
							
								
								
									
										143
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										143
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,89 +1,58 @@ | |||||||
| VERSION?=$(shell git describe --abbrev=0)+$(shell date +'%Y%m%d_%H%M%S') | EXECUTABLE=drone-email | ||||||
|  | VERSION?=$(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEAD) | ||||||
| EXECUTABLE:=drone-email |  | ||||||
|  |  | ||||||
|  | # Destination directory and prefix to place the compiled binaries, documentaions | ||||||
|  | # and other files. | ||||||
| DESTDIR?= | DESTDIR?= | ||||||
| PREFIX?=/usr/local | PREFIX?=/usr/local | ||||||
|  |  | ||||||
| # CONTAINER_RUNTIME | # CONTAINER_RUNTIME | ||||||
|  | # The CONTAINER_RUNTIME variable will be used to specified the path to a | ||||||
|  | # container runtime. This is needed to start and run a container image. | ||||||
| CONTAINER_RUNTIME?=$(shell which podman) | CONTAINER_RUNTIME?=$(shell which podman) | ||||||
|  |  | ||||||
| # DRONEEMAIL_IMAGE | # DRONE_EMAIL_IMAGE_REGISTRY_NAME | ||||||
| DRONEEMAIL_IMAGE_REGISTRY_HOST?=git.cryptic.systems | # Defines the name of the new container to be built using several variables. | ||||||
| DRONEEMAIL_IMAGE_REPOSITORY=volker.raschek/${EXECUTABLE} | DRONE_EMAIL_IMAGE_REGISTRY_NAME:=git.cryptic.systems | ||||||
| DRONEEMAIL_IMAGE_VERSION?=latest | DRONE_EMAIL_IMAGE_REGISTRY_USER:=volker.raschek | ||||||
| DRONEEMAIL_IMAGE_FULLY_QUALIFIED=${DRONEEMAIL_IMAGE_REGISTRY_HOST}/${DRONEEMAIL_IMAGE_REPOSITORY}:${DRONEEMAIL_IMAGE_VERSION} |  | ||||||
| DRONEEMAIL_IMAGE_UNQUALIFIED=${DRONEEMAIL_IMAGE_REPOSITORY}:${DRONEEMAIL_IMAGE_VERSION} |  | ||||||
|  |  | ||||||
| # BINARIES | DRONE_EMAIL_IMAGE_NAMESPACE?=${DRONE_EMAIL_IMAGE_REGISTRY_USER} | ||||||
|  | DRONE_EMAIL_IMAGE_NAME:=${EXECUTABLE} | ||||||
|  | DRONE_EMAIL_IMAGE_VERSION?=latest | ||||||
|  | DRONE_EMAIL_IMAGE_FULLY_QUALIFIED=${DRONE_EMAIL_IMAGE_REGISTRY_NAME}/${DRONE_EMAIL_IMAGE_NAMESPACE}/${DRONE_EMAIL_IMAGE_NAME}:${DRONE_EMAIL_IMAGE_VERSION} | ||||||
|  |  | ||||||
|  | # BIN | ||||||
| # ============================================================================== | # ============================================================================== | ||||||
| EXECUTABLES := ${EXECUTABLE} | drone-email: | ||||||
| EXECUTABLES += $(addsuffix .sh, ${EXECUTABLE}) |  | ||||||
| EXECUTABLES += $(addsuffix .fish, ${EXECUTABLE}) |  | ||||||
| EXECUTABLES += $(addsuffix .zsh, ${EXECUTABLE}) |  | ||||||
|  |  | ||||||
| all: ${EXECUTABLES} |  | ||||||
|  |  | ||||||
| ${EXECUTABLE}: |  | ||||||
| 	CGO_ENABLED=0 \ | 	CGO_ENABLED=0 \ | ||||||
| 	GONOPROXY=$(shell go env GONOPROXY) \ |  | ||||||
| 	GONOSUMDB=$(shell go env GONOSUMDB) \ |  | ||||||
| 	GOPRIVATE=$(shell go env GOPRIVATE) \ |  | ||||||
| 	GOPROXY=$(shell go env GOPROXY) \ | 	GOPROXY=$(shell go env GOPROXY) \ | ||||||
| 		go build -ldflags "-X main.version=${VERSION:v%=%}" -o ${@} | 		go build -ldflags "-X 'main.version=${VERSION}'" -o ${@} main.go | ||||||
|  |  | ||||||
| ${EXECUTABLE}.sh: ${EXECUTABLE} |  | ||||||
| 	./${EXECUTABLE} completion bash > ${EXECUTABLE}.sh |  | ||||||
|  |  | ||||||
| ${EXECUTABLE}.fish: ${EXECUTABLE} |  | ||||||
| 	./${EXECUTABLE} completion fish > ${EXECUTABLE}.fish |  | ||||||
|  |  | ||||||
| ${EXECUTABLE}.zsh: ${EXECUTABLE} |  | ||||||
| 	./${EXECUTABLE} completion zsh > ${EXECUTABLE}.zsh |  | ||||||
|  |  | ||||||
| # UN/INSTALL |  | ||||||
| # ============================================================================== |  | ||||||
| PHONY+=install |  | ||||||
| install: all |  | ||||||
| 	install --directory ${DESTDIR}${PREFIX}/bin |  | ||||||
| 	install --mode 755 ${EXECUTABLE} ${DESTDIR}${PREFIX}/bin/${EXECUTABLE} |  | ||||||
|  |  | ||||||
| 	install --directory ${DESTDIR}/etc/bash_completion.d |  | ||||||
| 	install --mode 644 ${EXECUTABLE}.sh ${DESTDIR}/etc/bash_completion.d/${EXECUTABLE}.sh |  | ||||||
|  |  | ||||||
| 	install --directory ${DESTDIR}${PREFIX}/share/fish/vendor_completions.d |  | ||||||
| 	install --mode 644 ${EXECUTABLE}.fish ${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/${EXECUTABLE}.fish |  | ||||||
|  |  | ||||||
| 	install --directory ${DESTDIR}${PREFIX}/share/zsh/site-functions |  | ||||||
| 	install --mode 644 ${EXECUTABLE}.zsh ${DESTDIR}${PREFIX}/share/zsh/site-functions/_${EXECUTABLE}.zsh |  | ||||||
|  |  | ||||||
| 	install --directory ${DESTDIR}${PREFIX}/licenses/${EXECUTABLE} |  | ||||||
| 	install --mode 644 LICENSE ${DESTDIR}${PREFIX}/licenses/${EXECUTABLE}/LICENSE |  | ||||||
|  |  | ||||||
| PHONY+=uninstall |  | ||||||
| uninstall: |  | ||||||
| 	-rm --recursive --force \ |  | ||||||
| 		${DESTDIR}${PREFIX}/bin/${EXECUTABLE} \ |  | ||||||
| 		${DESTDIR}/etc/bash_completion.d/${EXECUTABLE}.sh \ |  | ||||||
| 		${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/${EXECUTABLE}.fish \ |  | ||||||
| 		${DESTDIR}${PREFIX}/share/zsh/site-functions/_${EXECUTABLE}.zsh \ |  | ||||||
| 		${DESTDIR}${PREFIX}/licenses/${EXECUTABLE}/LICENSE |  | ||||||
|  |  | ||||||
| # CLEAN | # CLEAN | ||||||
| # ============================================================================== | # ============================================================================== | ||||||
| PHONY+=clean | PHONY+=clean | ||||||
| clean: | clean: | ||||||
| 	-rm -rf ${EXECUTABLE}* | 	rm --force --recursive drone-email | ||||||
|  |  | ||||||
| # TEST | # TESTS | ||||||
| # ============================================================================== | # ============================================================================== | ||||||
| PHONY+=test/unit | PHONY+=test/unit | ||||||
| test/unit: | test/unit: | ||||||
| 	go test -v -race -coverprofile=coverage.txt -covermode=atomic -timeout 600s -count=1 ./... | 	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: | ||||||
|  | 	CGO_ENABLED=0 \ | ||||||
|  | 	GOPROXY=$(shell go env GOPROXY) \ | ||||||
|  | 		go test -v -p 1 -count=1 -timeout 1200s ./it/... | ||||||
|  |  | ||||||
| PHONY+=test/coverage | PHONY+=test/coverage | ||||||
| test/coverage: test/unit | test/coverage: test/unit | ||||||
| 	go tool cover -html=coverage.txt | 	CGO_ENABLED=0 \ | ||||||
|  | 	GOPROXY=$(shell go env GOPROXY) \ | ||||||
|  | 		go tool cover -html=coverage.txt | ||||||
|  |  | ||||||
| # GOLANGCI-LINT | # GOLANGCI-LINT | ||||||
| # ============================================================================== | # ============================================================================== | ||||||
| @@ -91,25 +60,53 @@ PHONY+=golangci-lint | |||||||
| golangci-lint: | golangci-lint: | ||||||
| 	golangci-lint run --concurrency=$(shell nproc) | 	golangci-lint run --concurrency=$(shell nproc) | ||||||
|  |  | ||||||
| # CONTAINER-IMAGE | # INSTALL | ||||||
|  | # ============================================================================== | ||||||
|  | PHONY+=uninstall | ||||||
|  | install: drone-email | ||||||
|  | 	install --directory ${DESTDIR}/etc/bash_completion.d | ||||||
|  | 	./drone-email completion bash > ${DESTDIR}/etc/bash_completion.d/${EXECUTABLE} | ||||||
|  |  | ||||||
|  | 	install --directory ${DESTDIR}${PREFIX}/bin | ||||||
|  | 	install --mode 0755 ${EXECUTABLE} ${DESTDIR}${PREFIX}/bin/${EXECUTABLE} | ||||||
|  |  | ||||||
|  | 	install --directory ${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE} | ||||||
|  | 	install --mode 0644 LICENSE ${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE}/LICENSE | ||||||
|  |  | ||||||
|  | # UNINSTALL | ||||||
|  | # ============================================================================== | ||||||
|  | PHONY+=uninstall | ||||||
|  | uninstall: | ||||||
|  | 	-rm --force --recursive \ | ||||||
|  | 		${DESTDIR}/etc/bash_completion.d/${EXECUTABLE} \ | ||||||
|  | 		${DESTDIR}${PREFIX}/bin/${EXECUTABLE} \ | ||||||
|  | 		${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE} | ||||||
|  |  | ||||||
|  | # BUILD CONTAINER IMAGE | ||||||
| # ============================================================================== | # ============================================================================== | ||||||
| PHONY+=container-image/build | PHONY+=container-image/build | ||||||
| container-image/build: | container-image/build: | ||||||
| 	${CONTAINER_RUNTIME} build \ | 	${CONTAINER_RUNTIME} build \ | ||||||
| 		--build-arg GONOPROXY=${GOPROXY} \ |  | ||||||
| 		--build-arg GONOSUMDB=${GONOSUMDB} \ |  | ||||||
| 		--build-arg GOPRIVATE=${GOPRIVATE} \ |  | ||||||
| 		--build-arg GOPROXY=${GOPROXY} \ |  | ||||||
| 		--build-arg VERSION=${VERSION} \ | 		--build-arg VERSION=${VERSION} \ | ||||||
| 		--file ./Dockerfile \ | 		--file Dockerfile \ | ||||||
| 		--no-cache \ | 		--no-cache \ | ||||||
| 		--tag ${DRONEEMAIL_IMAGE_UNQUALIFIED} \ | 		--pull \ | ||||||
| 		--tag ${DRONEEMAIL_IMAGE_FULLY_QUALIFIED} \ | 		--tag ${DRONE_EMAIL_IMAGE_FULLY_QUALIFIED} \ | ||||||
|  | 		--tag ${DRONE_EMAIL_IMAGE_UNQUALIFIED} \ | ||||||
| 		. | 		. | ||||||
|  |  | ||||||
|  | # DELETE CONTAINER IMAGE | ||||||
|  | # ============================================================================== | ||||||
|  | PHONY:=container-image/delete | ||||||
|  | container-image/delete: | ||||||
|  | 	- ${CONTAINER_RUNTIME} image rm ${DRONE_EMAIL_IMAGE_FULLY_QUALIFIED} | ||||||
|  |  | ||||||
|  | # PUSH CONTAINER IMAGE | ||||||
|  | # ============================================================================== | ||||||
| PHONY+=container-image/push | PHONY+=container-image/push | ||||||
| container-image/push: container-image/build | container-image/push: | ||||||
| 	${CONTAINER_RUNTIME} push ${DRONEEMAIL_IMAGE_FULLY_QUALIFIED} | 	echo ${DRONE_EMAIL_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${DRONE_EMAIL_IMAGE_REGISTRY_NAME} --username ${DRONE_EMAIL_IMAGE_REGISTRY_USER} --password-stdin | ||||||
|  | 	${CONTAINER_RUNTIME} push ${DRONE_EMAIL_IMAGE_FULLY_QUALIFIED} | ||||||
|  |  | ||||||
| # PHONY | # PHONY | ||||||
| # ============================================================================== | # ============================================================================== | ||||||
|   | |||||||
							
								
								
									
										24
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,9 +1,7 @@ | |||||||
| # drone-email | # drone-email | ||||||
|  |  | ||||||
| [](https://drone.cryptic.systems/volker.raschek/drone-email) | A Drone CI/CD plugin to send build status notifications via email. The plugin is currently available for the following | ||||||
|  | architectures: | ||||||
| A Drone CI/CD plugin to send build status notifications via email. The plugin is |  | ||||||
| currently available for the following architectures: |  | ||||||
|  |  | ||||||
| - x86_64  / amd64 | - x86_64  / amd64 | ||||||
| - aarch64 / arm64 | - aarch64 / arm64 | ||||||
| @@ -11,8 +9,7 @@ currently available for the following architectures: | |||||||
|  |  | ||||||
| ## Compile or install the binary locally | ## Compile or install the binary locally | ||||||
|  |  | ||||||
| Checkout the source code of the project and use `make` to compile or install the | Checkout the source code of the project and use `make` to compile or install the binary locally. | ||||||
| binary locally. |  | ||||||
|  |  | ||||||
| ```bash | ```bash | ||||||
| make all          # compile all targets, including shell completions | make all          # compile all targets, including shell completions | ||||||
| @@ -22,8 +19,8 @@ make install      # install the binary with completions locally | |||||||
|  |  | ||||||
| ## Usage | ## Usage | ||||||
|  |  | ||||||
| All params can be defined via cli flags. A list of all provided cli-flags will | All params can be defined via cli flags. A list of all provided cli-flags will be written to `stdout` via `drone-email | ||||||
| be written to `stdout` via `drone-email --help`. | --help`. | ||||||
|  |  | ||||||
| Alternatively can be the flags defined via environment variables or a config file. | Alternatively can be the flags defined via environment variables or a config file. | ||||||
|  |  | ||||||
| @@ -111,14 +108,11 @@ smtp-username: noreply@example.local | |||||||
|  |  | ||||||
| ### Multiple success emails despite failed ci step | ### Multiple success emails despite failed ci step | ||||||
|  |  | ||||||
| The [drone-runner-kube](https://github.com/drone-runners/drone-runner-kube) does | The [drone-runner-kube](https://github.com/drone-runners/drone-runner-kube) does not define the environment variable | ||||||
| not define the environment variable `DRONE_PREV_BUILD_STATUS` like the | `DRONE_PREV_BUILD_STATUS` like the [drone-runner-docker](https://github.com/drone-runners/drone-runner-docker). This | ||||||
| [drone-runner-docker](https://github.com/drone-runners/drone-runner-docker). | make it impossible to use the correct email template based on the build state of the previous step. | ||||||
| This make it impossible to use the correct email template based on the build |  | ||||||
| state of the previous step. |  | ||||||
|  |  | ||||||
| Furthermore, the environment variable `DRONE_BUILD_STATUS` is always defined as | Furthermore, the environment variable `DRONE_BUILD_STATUS` is always defined as `success`, even if the build has failed. | ||||||
| `success`, even if the build has failed. |  | ||||||
|  |  | ||||||
| Related issues: | Related issues: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -50,7 +50,7 @@ PowerShell: | |||||||
| `, | `, | ||||||
| 	DisableFlagsInUseLine: true, | 	DisableFlagsInUseLine: true, | ||||||
| 	ValidArgs:             []string{"bash", "zsh", "fish", "powershell"}, | 	ValidArgs:             []string{"bash", "zsh", "fish", "powershell"}, | ||||||
| 	Args:                  cobra.ExactValidArgs(1), | 	Args:                  cobra.MatchAll(cobra.ExactArgs(1)), | ||||||
| 	Hidden:                true, | 	Hidden:                true, | ||||||
| 	Run: func(cmd *cobra.Command, args []string) { | 	Run: func(cmd *cobra.Command, args []string) { | ||||||
| 		switch args[0] { | 		switch args[0] { | ||||||
|   | |||||||
							
								
								
									
										32
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								go.mod
									
									
									
									
									
								
							| @@ -1,28 +1,24 @@ | |||||||
| module git.cryptic.systems/volker.raschek/drone-email-docker | module git.cryptic.systems/volker.raschek/drone-email-docker | ||||||
|  |  | ||||||
| go 1.21.0 | go 1.24.3 | ||||||
|  |  | ||||||
| toolchain go1.24.1 |  | ||||||
|  |  | ||||||
| require ( | require ( | ||||||
| 	github.com/spf13/cobra v1.9.1 | 	github.com/spf13/cobra v1.10.1 | ||||||
| 	github.com/spf13/pflag v1.0.6 | 	github.com/spf13/pflag v1.0.10 | ||||||
| 	github.com/spf13/viper v1.20.1 | 	github.com/spf13/viper v1.21.0 | ||||||
| ) | ) | ||||||
|  |  | ||||||
| require ( | require ( | ||||||
| 	github.com/fsnotify/fsnotify v1.8.0 // indirect | 	github.com/fsnotify/fsnotify v1.9.0 // indirect | ||||||
| 	github.com/go-viper/mapstructure/v2 v2.2.1 // indirect | 	github.com/go-viper/mapstructure/v2 v2.4.0 // indirect | ||||||
| 	github.com/inconshreveable/mousetrap v1.1.0 // indirect | 	github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||||||
| 	github.com/pelletier/go-toml/v2 v2.2.3 // indirect | 	github.com/pelletier/go-toml/v2 v2.2.4 // indirect | ||||||
| 	github.com/sagikazarmark/locafero v0.7.0 // indirect | 	github.com/sagikazarmark/locafero v0.11.0 // indirect | ||||||
| 	github.com/sourcegraph/conc v0.3.0 // indirect | 	github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect | ||||||
| 	github.com/spf13/afero v1.12.0 // indirect | 	github.com/spf13/afero v1.15.0 // indirect | ||||||
| 	github.com/spf13/cast v1.7.1 // indirect | 	github.com/spf13/cast v1.10.0 // indirect | ||||||
| 	github.com/subosito/gotenv v1.6.0 // indirect | 	github.com/subosito/gotenv v1.6.0 // indirect | ||||||
| 	go.uber.org/atomic v1.9.0 // indirect | 	go.yaml.in/yaml/v3 v3.0.4 // indirect | ||||||
| 	go.uber.org/multierr v1.9.0 // indirect | 	golang.org/x/sys v0.33.0 // indirect | ||||||
| 	golang.org/x/sys v0.29.0 // indirect | 	golang.org/x/text v0.28.0 // indirect | ||||||
| 	golang.org/x/text v0.21.0 // indirect |  | ||||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect |  | ||||||
| ) | ) | ||||||
|   | |||||||
							
								
								
									
										62
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										62
									
								
								go.sum
									
									
									
									
									
								
							| @@ -1,13 +1,12 @@ | |||||||
| github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= | github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= | ||||||
| github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |  | ||||||
| github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||||||
| github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||||||
| github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= | github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= | ||||||
| github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= | github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= | ||||||
| github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= | github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= | ||||||
| github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= | github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= | ||||||
| github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= | github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= | ||||||
| github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= | github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= | ||||||
| github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | ||||||
| github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||||||
| github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= | ||||||
| @@ -16,41 +15,38 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= | |||||||
| github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= | ||||||
| github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= | ||||||
| github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= | ||||||
| github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= | github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= | ||||||
| github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= | github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= | ||||||
| github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||||||
| github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||||||
| github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= | github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= | ||||||
| github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= | github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= | ||||||
| github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | ||||||
| github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo= | github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= | ||||||
| github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k= | github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= | ||||||
| github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= | github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= | ||||||
| github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= | github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= | ||||||
| github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= | github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= | ||||||
| github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= | github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= | ||||||
| github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= | github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= | ||||||
| github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= | github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= | ||||||
| github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= | github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= | ||||||
| github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= | github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= | ||||||
| github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= | github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | ||||||
| github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= | ||||||
| github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= | github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | ||||||
| github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= | github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= | ||||||
| github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= | ||||||
| github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= | github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= | ||||||
| github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= | github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= | ||||||
| github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= |  | ||||||
| github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= | github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= | ||||||
| github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | ||||||
| go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= | go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= | ||||||
| go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= | go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= | ||||||
| go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= | golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= | ||||||
| go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= | golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= | ||||||
| golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= | golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= | ||||||
| golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= | ||||||
| golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= |  | ||||||
| golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= |  | ||||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||||
| gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= | ||||||
| gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||||
|   | |||||||
| @@ -1,20 +0,0 @@ | |||||||
| image: git.cryptic.systems/volker.raschek/drone-email:{{#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/drone-email:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64 |  | ||||||
|     platform: |  | ||||||
|       architecture: amd64 |  | ||||||
|       os: linux |  | ||||||
|   - |  | ||||||
|     image: git.cryptic.systems/volker.raschek/drone-email:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8 |  | ||||||
|     platform: |  | ||||||
|       architecture: arm64 |  | ||||||
|       os: linux |  | ||||||
|       variant: v8 |  | ||||||
		Reference in New Issue
	
	Block a user