-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
142 lines (130 loc) · 3.58 KB
/
.drone.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
kind: pipeline
type: kubernetes
name: build-images
trigger:
event:
- push
image_pull_secrets:
- DOCKER_CONFIG_JSON
steps:
- name: build-finetune
image: harbor.devops.indico.io/indico/drone-builder
settings:
username:
from_secret: harbor_username
password:
from_secret: harbor_password
registry: harbor.devops.indico.io
repo: harbor.devops.indico.io/indico/project_fruitfly_finetune
tags:
- ${DRONE_SOURCE_BRANCH/\//-}.${DRONE_COMMIT_SHA}
squash: true
experimental: true
context: .
dockerfile: finetune/Dockerfile
environment:
DOCKER_BUILDKIT: 1
POETRY_INSTALL_ARGS: ""
- name: build-layoutlm
image: harbor.devops.indico.io/indico/drone-builder
settings:
username:
from_secret: harbor_username
password:
from_secret: harbor_password
registry: harbor.devops.indico.io
repo: harbor.devops.indico.io/indico/project_fruitfly_layoutlm
tags:
- ${DRONE_SOURCE_BRANCH/\//-}.${DRONE_COMMIT_SHA}
squash: true
experimental: true
context: .
dockerfile: layoutlmv3/Dockerfile
environment:
DOCKER_BUILDKIT: 1
POETRY_INSTALL_ARGS: ""
- name: build-huggingface
image: harbor.devops.indico.io/indico/drone-builder
settings:
username:
from_secret: harbor_username
password:
from_secret: harbor_password
registry: harbor.devops.indico.io
repo: harbor.devops.indico.io/indico/project_fruitfly_huggingface
tags:
- ${DRONE_SOURCE_BRANCH/\//-}.${DRONE_COMMIT_SHA}
squash: true
experimental: true
context: .
dockerfile: huggingface_token_classification/Dockerfile
environment:
DOCKER_BUILDKIT: 1
POETRY_INSTALL_ARGS: ""
---
kind: pipeline
type: kubernetes
name: build-charts
depends-on:
- build-images
concurrency:
limit: 1 # allow 1 at most (dont over load chartmuseum)
trigger:
event:
- push
steps:
- name: push helm charts
image: alpine/helm:3.10.2
commands:
- echo https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
- apk update
- apk add yq jq bash curl wget
- wget -c https://github.com/shteou/helm-dependency-fetch/releases/download/v1.1.3/helm-dependency-fetch_1.1.3_Linux_x86_64.tar.gz -O - | tar -xz
- export PATH=$${CWD}:$${PATH}
- helm version
- helm plugin install https://github.com/chartmuseum/helm-push --version 0
- helm repo add --username $USERNAME --password $PASSWORD harborprod https://harbor.devops.indico.io/chartrepo/indico-charts
- helm_scripts/update_image_tags.sh
- helm_scripts/upload_helm_charts.sh "$DRONE_BRANCH-${DRONE_COMMIT_SHA:0:8}"
environment:
PYTHONUNBUFFERED: '1'
IMAGE_TAG: ${DRONE_SOURCE_BRANCH/\//-}.${DRONE_COMMIT_SHA}
HARBOR_API_TOKEN:
from_secret: harbor_api_token
HELM_EXPERIMENTAL_OCI: 1
PASSWORD:
from_secret: harbor_password
USERNAME:
from_secret: harbor_username
image_pull_secrets:
- harbor_pull_secret
---
kind: secret
name: DOCKER_CONFIG_JSON
get:
path: tools/drone/devops_harbor_pull_secret
name: DOCKER_CONFIG_JSON
---
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
---
kind: secret
name: harbor_api_token
get:
path: tools/drone/harbor-api
name: bearer_token