-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.drone.yml
More file actions
94 lines (92 loc) · 1.86 KB
/
.drone.yml
File metadata and controls
94 lines (92 loc) · 1.86 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
82
83
84
85
86
87
88
89
90
91
92
93
94
kind: pipeline
type: docker
name: test
platform:
os: linux
arch: arm64
trigger:
branch:
- release
steps:
- name: run tests
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- dotnet test
---
kind: pipeline
type: docker
name: build Deploy Images
depends_on:
- test
platform:
os: linux
arch: arm64
trigger:
branch:
- release
steps:
- name: build Api
image: plugins/docker
settings:
dockerfile: src/Api/Dockerfile
context: .
registry: registry.swerik.dev
repo: registry.swerik.dev/poegamblinghelper/api
tags: latest
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
environment:
DOCKER_BUILDKIT: 1
- name: build Web
image: plugins/docker
settings:
dockerfile: src/Web/Dockerfile
context: .
registry: registry.swerik.dev
repo: registry.swerik.dev/poegamblinghelper/web
tags: latest
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
environment:
DOCKER_BUILDKIT: 1
- name: parallelism
image: alpine
commands:
- echo finished
depends_on:
- build Api
- build Web
---
kind: pipeline
type: ssh
name: Deploy
depends_on:
- build Deploy Images
platform:
os: linux
arch: arm64
trigger:
branch:
- release
server:
host: erikpi
user:
from_secret: SSH_USERNAME
password:
from_secret: SSH_PASSWORD
steps:
- name: docker login & Deploy
commands:
- docker --config /home/drone/.docker login localhost:5000 -u $USERNAME -p $PASSWORD
- docker --config /home/drone/.docker compose up -d --pull always
environment:
USERNAME:
from_secret: REGISTRY_USERNAME
PASSWORD:
from_secret: REGISTRY_PASSWORD
POSTGRES_PASSWORD:
from_secret: POSTGRES_PASSWORD