81 lines
1.9 KiB
YAML
81 lines
1.9 KiB
YAML
---
|
|
when:
|
|
path: "frontend/**"
|
|
event: [push, tag]
|
|
variables:
|
|
- &frontend_image "cl00e9ment/node.js-builder:git@sha256:c3f6622a282e81536fa07c0218dfc35aa4141076679d9ea73839ae0032bd57cb"
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git@sha256:7af90de3a9aa5dc93cc0d5cd2e67e28cb237d4b8e891ccacfd9031f78f4b05a8
|
|
settings:
|
|
skip_verify: true
|
|
partial: false
|
|
tags: true
|
|
steps:
|
|
"prepare:version":
|
|
image: bitnami/git:2.43.0@sha256:3932583adf73c9e7e75232c0a3637fb0ff7833d7a81c858e74468df0dbd89cf1
|
|
commands:
|
|
- . ./version.sh
|
|
"prepare:frontend":
|
|
image: *frontend_image
|
|
depends_on: ["prepare:version"]
|
|
commands:
|
|
- pnpm install --frozen-lockfile
|
|
- find . -name "prettier"
|
|
directory: frontend
|
|
|
|
"lint:style":
|
|
image: *frontend_image
|
|
depends_on: ["prepare:frontend"]
|
|
commands:
|
|
- sleep 5s
|
|
- find . -name "prettier"
|
|
- pnpm run prettier
|
|
directory: frontend
|
|
|
|
"lint:analyze":
|
|
image: *frontend_image
|
|
depends_on: ["prepare:frontend"]
|
|
commands:
|
|
- sleep 5s
|
|
- pnpm run lint
|
|
directory: frontend
|
|
|
|
"build:frontend":
|
|
image: *frontend_image
|
|
depends_on: ["prepare:frontend"]
|
|
commands:
|
|
- sleep 5s
|
|
- pnpm run build
|
|
directory: frontend
|
|
|
|
"build:tsc":
|
|
image: *frontend_image
|
|
depends_on: ["prepare:frontend"]
|
|
commands:
|
|
- pnpm add typescript
|
|
- pnpm run typecheck
|
|
directory: frontend
|
|
|
|
"analyze:sbom":
|
|
image: *frontend_image
|
|
depends_on: ["prepare:frontend"]
|
|
commands:
|
|
- rm -rf node_modules
|
|
- pnpm install
|
|
- pnpm dlx @cyclonedx/cyclonedx-npm --output-file bom.json
|
|
directory: frontend
|
|
|
|
"deploy:frontend":
|
|
image: alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b
|
|
depends_on: ["build:frontend"]
|
|
commands:
|
|
- echo "deploy frontend"
|
|
- env
|
|
directory: frontend
|
|
when:
|
|
- event: [manual]
|
|
|
|
#depends_on:
|
|
# - "lint_general"
|