1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00
woodpecker/.woodpecker/web.yml
6543 8da0ee47f7
Use variables in pipeline (#1026)
use yaml aliases (https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases) to have pipeline `variables`

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2022-07-17 18:25:56 +02:00

52 lines
785 B
YAML

variables:
- &node_image 'node:16-alpine'
- &when_path
# web source code
- "web/**"
pipeline:
deps:
image: *node_image
commands:
- cd web/
- yarn install --frozen-lockfile
when:
path: *when_path
lint:
group: test
image: *node_image
commands:
- cd web/
- yarn lint
when:
path: *when_path
formatcheck:
group: test
image: *node_image
commands:
- cd web/
- yarn formatcheck
when:
path: *when_path
typecheck:
group: test
image: *node_image
commands:
- cd web/
- yarn typecheck
when:
path: *when_path
test:
group: test
image: *node_image
commands:
- cd web/
- yarn test
when:
path: *when_path