mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-24 10:02:23 +07:00
b98060294d
Replaced by Woodpecker CI. It turns out I don't need that much power from Tekton's flexibility, so it's not worth the maintenance overhead for my specific use case at home.
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: gitea-config-{{ include (print $.Template.BasePath "/config-source.yaml") . | sha256sum | trunc 7 }}
|
|
namespace: {{ .Release.Namespace }}
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
spec:
|
|
backoffLimit: 3
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: apply
|
|
image: golang:1.19-alpine
|
|
env:
|
|
- name: GITEA_HOST
|
|
value: http://gitea-http:3000
|
|
- name: GITEA_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: gitea-admin-secret
|
|
key: username
|
|
- name: GITEA_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: gitea-admin-secret
|
|
key: password
|
|
workingDir: /go/src/gitea-config
|
|
command:
|
|
- sh
|
|
- -c
|
|
args:
|
|
- |
|
|
go get .
|
|
go run .
|
|
volumeMounts:
|
|
- name: source
|
|
mountPath: /go/src/gitea-config
|
|
volumes:
|
|
- name: source
|
|
configMap:
|
|
name: gitea-config-source
|