-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
107 lines (98 loc) · 2.41 KB
/
.woodpecker.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
when:
- event: [pull_request, tag]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
variables:
- &node_image "docker.io/node:22-alpine"
- &cache_image "docker.io/meltwater/drone-cache:v1.4.0"
- &buildx_plugin "docker.io/woodpeckerci/plugin-docker-buildx:3.1.0"
steps:
- name: ♻️ Restore Cache
image: *cache_image
settings:
backend: filesystem
restore: true
cache_key: volume
archive_format: gzip
mount:
- "webapp/node_modules"
- ".docker/cache"
volumes:
- /tmp/cache:/tmp/cache
- name: 📦 Install Web App
depends_on:
- ♻️ Restore Cache
image: *node_image
directory: webapp/
commands:
- corepack enable
- pnpm install --frozen-lockfile
- name: 🧽 Format Check Web App
depends_on:
- 📦 Install Web App
image: *node_image
directory: webapp/
commands:
- corepack enable
- pnpm lint
- name: 🔎 Lint Web App
depends_on:
- 🧽 Format Check Web App
image: *node_image
directory: webapp/
commands:
- corepack enable
- pnpm lint
- name: ✨ Generate Version
depends_on:
- 🔎 Lint Web App
image: *node_image
directory: webapp/
commands:
- corepack enable
- pnpm generate-version
- name: 🏗️ Build Web App
depends_on:
- ✨ Generate Version
image: *node_image
directory: webapp/
commands:
- corepack enable
- pnpm build
- name: 🐳 Build Server and publish
depends_on:
- 🏗️ Build Web App
image: *buildx_plugin
settings:
repo: git.kinderspielstadt.de/kispi/core
dockerfile: Dockerfile
tag:
[
latest,
"${CI_COMMIT_TAG}",
"${CI_COMMIT_TAG%.*}",
"${CI_COMMIT_TAG%%.*}",
]
cache-from: type=local,src=.docker/cache
cache-to: type=local,dest=.docker/cache
logins:
- registry: https://git.kinderspielstadt.de
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: 🔨 Rebuild Cache
depends_on:
- 🐳 Build Server and publish
image: *cache_image
settings:
backend: filesystem
rebuild: true
cache_key: volume
archive_format: gzip
mount:
- "webapp/node_modules"
- ".docker/cache"
volumes:
- /tmp/cache:/tmp/cache