country-geo-locations/.drone.yml

89 lines
2 KiB
YAML
Raw Normal View History

2023-12-22 21:03:28 +01:00
kind: pipeline
2023-12-22 21:25:22 +01:00
name: build
2023-12-22 21:03:28 +01:00
steps:
- name: docker
2023-12-22 21:25:22 +01:00
image: thegeeklab/drone-docker-buildx
privileged: true
2023-12-22 21:03:28 +01:00
settings:
2023-12-24 18:25:35 +01:00
registry: git.ar21.de
2023-12-22 21:03:28 +01:00
username:
2023-12-24 18:25:35 +01:00
from_secret: REGISTRY_USER
2023-12-22 21:03:28 +01:00
password:
2023-12-24 18:25:35 +01:00
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/country-geo-locations
2023-12-22 21:03:28 +01:00
tags:
- latest
- ${DRONE_BUILD_NUMBER}
2023-12-22 21:25:22 +01:00
platforms:
- linux/arm64
- linux/amd64
2023-12-22 21:03:28 +01:00
when:
branch:
- main
event:
2023-12-23 17:17:23 +01:00
- push
- name: docker-build
image: thegeeklab/drone-docker-buildx
privileged: true
settings:
2023-12-24 18:25:35 +01:00
registry: git.ar21.de
2023-12-23 17:17:23 +01:00
username:
2023-12-24 18:25:35 +01:00
from_secret: REGISTRY_USER
2023-12-23 17:17:23 +01:00
password:
2023-12-24 18:25:35 +01:00
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/country-geo-locations
2023-12-23 17:17:23 +01:00
tags:
- latest
- ${DRONE_BUILD_NUMBER}
platforms:
- linux/arm64
- linux/amd64
dry_run: true
when:
branch:
exclude:
- main
event:
- push
2023-12-23 17:40:57 +01:00
- name: bump tag in deployment-repo
image: aaronriedel/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/yolokube/fail2ban-exporter-deployment.git .
- cd /deployment-repo
2023-12-24 18:25:35 +01:00
- kustomize edit set image git.ar21.de/yolokube/country-geo-locations=git.ar21.de/yolokube/country-geo-locations:${DRONE_BUILD_NUMBER}
2023-12-23 17:40:57 +01:00
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
- main
event:
- push
- name: push new tag to deployment-repo
image: appleboy/drone-git-push
settings:
branch: main
remote: ssh://git@git.ar21.de:2222/yolokube/fail2ban-exporter-deployment.git
path: /deployment-repo
force: false
commit: true
commit_message: "yolokube/country-geo-locations: update image tag to ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline)"
ssh_key:
from_secret: GITEA_SSH_KEY
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
- main
event:
- push
volumes:
- name: deployment-repo
temp: {}
2023-12-23 17:17:23 +01:00
when:
event:
exclude:
- pull_request