-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.drone.yml
More file actions
81 lines (71 loc) · 1.88 KB
/
.drone.yml
File metadata and controls
81 lines (71 loc) · 1.88 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
kind: pipeline
type: kubernetes
name: devops-charts
concurrency:
limit: 1
steps:
- name: main build
image: alpine/helm:3.9.0
commands:
- echo https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
- apk update
- apk add yq jq bash
- helm version
- helm plugin install https://github.com/chartmuseum/helm-push --version 0
- helm repo add --username $USERNAME --password $PASSWORD harbordevops https://harbor.devops.indico.io/chartrepo/indico-devops
- ./upload-charts.sh
environment:
HELM_EXPERIMENTAL_OCI: 1
PASSWORD:
from_secret: harbor_password
USERNAME:
from_secret: harbor_username
when:
branch:
- main
event:
- push
- tag
- name: branch build
image: alpine/helm:3.9.0
commands:
- echo https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
- apk update
- apk add yq jq bash
- helm version
- helm plugin install https://github.com/chartmuseum/helm-push --version 0
- helm repo add --username $USERNAME --password $PASSWORD harbordevops https://harbor.devops.indico.io/chartrepo/indico-devops
- ./upload-charts.sh "$DRONE_BRANCH-${DRONE_COMMIT_SHA:0:8}"
environment:
HELM_EXPERIMENTAL_OCI: 1
PASSWORD:
from_secret: harbor_password
USERNAME:
from_secret: harbor_username
when:
event:
- push
- tag
branch:
exclude:
- main
image_pull_secrets:
- harbor_pull_secret
---
kind: secret
name: harbor_pull_secret
get:
path: tools/drone/devops_harbor_pull_secret
name: DOCKER_CONFIG_JSON
---
kind: secret
name: harbor_username
get:
path: tools/drone/harbor-push-token
name: username
---
kind: secret
name: harbor_password
get:
path: tools/drone/harbor-push-token
name: password