This commit is contained in:
parent
ad7b67990e
commit
143edec968
3 changed files with 45 additions and 59 deletions
42
.drone.yml
42
.drone.yml
|
@ -67,7 +67,49 @@ steps:
|
|||
depends_on:
|
||||
- gofmt
|
||||
- vuln-check
|
||||
- name: bump tag in deployment-repo
|
||||
image: aaronriedel/kustomize-ci
|
||||
commands:
|
||||
- cd /deployment-repo
|
||||
- git clone https://git.ar21.de/yolokube/grafana-backuper-deployment.git .
|
||||
- cd /deployment-repo/overlay
|
||||
- kustomize edit set image git.ar21.de/yolokube/grafana-backuper=git.ar21.de/yolokube/grafana-backuper:${DRONE_BUILD_NUMBER}
|
||||
volumes:
|
||||
- name: deployment-repo
|
||||
path: /deployment-repo
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
depends_on:
|
||||
- docker
|
||||
- name: push new tag to deployment-repo
|
||||
image: appleboy/drone-git-push
|
||||
settings:
|
||||
branch: main
|
||||
remote: ssh://git@git.ar21.de:2222/yolokube/grafana-backuper-deployment.git
|
||||
path: /deployment-repo
|
||||
force: false
|
||||
commit: true
|
||||
commit_message: "GRAFANA-BACKUPER: 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
|
||||
depends_on:
|
||||
- bump tag in deployment-repo
|
||||
volumes:
|
||||
- name: deployment-repo
|
||||
temp: {}
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
[![Build Status](https://drone.ar21.de/api/badges/yolokube/grafana-backuper/status.svg)](https://drone.ar21.de/yolokube/grafana-backuper)
|
||||
[![App Status](https://argo.services.yolokube.de/api/badge?name=grafana-backuper)](https://argo.services.yolokube.de/applications/grafana-backuper)
|
||||
|
||||
# grafana-backuper
|
||||
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: grafana-backuper
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: grafana-backuper
|
||||
namespace: grafana-backuper
|
||||
spec:
|
||||
schedule: "0 * * * *"
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 3
|
||||
jobTemplate:
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 1800
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: grafana-backuper
|
||||
image: git.ar21.de/yolokube/grafana-backuper:latest
|
||||
env:
|
||||
- name: GRAFANA_URL
|
||||
value: "http://prometheus-grafana.prometheus"
|
||||
- name: GRAFANA_AUTH_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: grafana-secrets
|
||||
key: grafana-auth-token
|
||||
- name: GIT_REPO_URL
|
||||
value: "https://git.ar21.de/yolokube/grafana-dashboards.git"
|
||||
- name: GIT_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: git-secrets
|
||||
key: git-user
|
||||
- name: GIT_EMAIL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: git-secrets
|
||||
key: git-email
|
||||
- name: GIT_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: git-secrets
|
||||
key: git-pass
|
||||
- name: GIT_SIGNING_KEY
|
||||
value: /app/keys/signing-key.asc
|
||||
volumeMounts:
|
||||
- name: key-volume
|
||||
mountPath: /app/keys
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumes:
|
||||
- name: key-volume
|
||||
secret:
|
||||
secretName: gpg-key
|
||||
restartPolicy: Never
|
Loading…
Reference in a new issue