-
Notifications
You must be signed in to change notification settings - Fork 163
/
drone.gotmpl
35 lines (34 loc) · 1018 Bytes
/
drone.gotmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{{- $v := .Environment.Values }}
{{- $c := $v.charts }}
{{- $d := $c | get "drone" dict }}
{{- $g := $v.charts | get "gitea" dict }}
{{- $hasGitea := $g | get "enabled" true }}
{{- $skipVerify := eq ($v.charts | get "cert-manager.stage" "production") "staging" }}
{{- $teams := keys $v.teamConfig.teams }}
{{- $teamNames := list -}}
{{- range $teams -}}
{{- $teamNames = print "team-" . | append $teamNames -}}
{{- end -}}
type: Job
enabled: false
description: Configure Drone to sync the values repo
image:
repository: otomi/tasks
tag: v0.2.9
# pullPolicy: Always
name: drone
nativeSecrets:
DRONE_TOKEN: {{ $d | get "adminToken" }}
env:
# DEBUG: '*'
DRONE_CONFIG_PATH: .drone.yml
{{- if $hasGitea }}
DRONE_OWNER: "otomi-admin"
DRONE_REPO: "values"
{{- else }}
DRONE_OWNER: {{ $d | get "owner" }}
DRONE_REPO: {{ $d | get "repo" }}
{{- end }}
DRONE_URL: http://drone.team-admin
script: {{ if $skipVerify }}NODE_TLS_REJECT_UNAUTHORIZED=0 {{ end }}npm run tasks:drone
runPolicy: OnSpecChange