-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yaml
53 lines (50 loc) · 1.75 KB
/
.drone.yaml
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
kind: pipeline
type: kubernetes
name: default
steps:
- name: Build base image
image: plugins/docker
settings:
registry: registry.ivanchenko.io
repo: registry.ivanchenko.io/library/${DRONE_REPO_NAME}
target: build
cache_from:
- registry.ivanchenko.io/library/${DRONE_REPO_NAME}:build-${DRONE_BRANCH/\//-}
- registry.ivanchenko.io/library/${DRONE_REPO_NAME}:build-main
tags:
- build-${DRONE_BRANCH/\//-}
- build-${DRONE_BRANCH/\//-}-${DRONE_COMMIT:0:8}
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
mtu: 1000
- name: Build production image
image: plugins/docker
settings:
registry: registry.ivanchenko.io
repo: registry.ivanchenko.io/library/${DRONE_REPO_NAME}
cache_from:
- registry.ivanchenko.io/library/${DRONE_REPO_NAME}:build-${DRONE_BRANCH/\//-}
- registry.ivanchenko.io/library/${DRONE_REPO_NAME}:build-main
- registry.ivanchenko.io/library/${DRONE_REPO_NAME}:${DRONE_BRANCH/\//-}
- registry.ivanchenko.io/library/${DRONE_REPO_NAME}:main
tags:
- ${DRONE_BRANCH/\//-}
- ${DRONE_BRANCH/\//-}-${DRONE_COMMIT:0:8}
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
mtu: 1000
- name: helm
image: alpine/helm:3.10.0
environment:
REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
commands:
- helm registry login registry.ivanchenko.io -u $${REGISTRY_USERNAME} -p $${REGISTRY_PASSWORD}
- chart=$$(helm package chart)
- helm push $$(basename $${chart#*/}) oci://registry.ivanchenko.io/library