70 lines
1.3 KiB
YAML
70 lines
1.3 KiB
YAML
---
|
|
when:
|
|
path: "frontend/**"
|
|
event: [push, tag]
|
|
variables:
|
|
- &frontend_image "cl00e9ment/node.js-builder:git"
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
skip_verify: true
|
|
partial: false
|
|
tags: true
|
|
steps:
|
|
"prepare:version":
|
|
image: bitnami/git:2.43.0
|
|
commands:
|
|
- . ./version.sh
|
|
"prepare:frontend":
|
|
image: *frontend_image
|
|
depends_on: ["prepare:version"]
|
|
commands:
|
|
- pnpm install
|
|
directory: frontend
|
|
|
|
"lint:style":
|
|
image: *frontend_image
|
|
commands:
|
|
- pnpm run prettier
|
|
directory: frontend
|
|
|
|
"lint:analyze":
|
|
image: *frontend_image
|
|
commands:
|
|
- pnpm run lint
|
|
directory: frontend
|
|
|
|
"build:frontend":
|
|
image: *frontend_image
|
|
commands:
|
|
- pnpm run build
|
|
directory: frontend
|
|
|
|
"build:tsc":
|
|
image: *frontend_image
|
|
commands:
|
|
- pnpm add typescript
|
|
- pnpm run typecheck
|
|
directory: frontend
|
|
|
|
"analyze:sbom":
|
|
image: *frontend_image
|
|
commands:
|
|
- rm -rf node_modules
|
|
- npm install
|
|
- npx @cyclonedx/cyclonedx-npm --output-file bom.json
|
|
directory: frontend
|
|
|
|
"deploy:frontend":
|
|
image: alpine:latest
|
|
commands:
|
|
- echo "deploy frontend"
|
|
- env
|
|
directory: frontend
|
|
when:
|
|
- event: [manual]
|
|
|
|
depends_on:
|
|
- "lint_general"
|