ci/woodpecker/push/calendar Pipeline was successful
ci/woodpecker/push/cli Pipeline was successful
ci/woodpecker/push/config Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/jobs Pipeline was successful
ci/woodpecker/push/video-chat Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/worker Pipeline was successful
168 lines
4.1 KiB
YAML
168 lines
4.1 KiB
YAML
workspace:
|
|
base: /workspace
|
|
path: src
|
|
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
path:
|
|
include:
|
|
- ".woodpecker/web.yml"
|
|
- "apps/web/**"
|
|
- "packages/**"
|
|
- "package.json"
|
|
- "pnpm-workspace.yaml"
|
|
- "pnpm-lock.yaml"
|
|
- event: pull_request
|
|
path:
|
|
include:
|
|
- ".woodpecker/web.yml"
|
|
- "apps/web/**"
|
|
- "packages/**"
|
|
- "package.json"
|
|
- "pnpm-workspace.yaml"
|
|
- "pnpm-lock.yaml"
|
|
- event: tag
|
|
ref: "refs/tags/@when/web@*"
|
|
|
|
steps:
|
|
prepare:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- corepack prepare pnpm@11.9.0 --activate
|
|
- pnpm config set store-dir .pnpm-store
|
|
- pnpm install --frozen-lockfile
|
|
- pnpm build:packages
|
|
|
|
lint:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- cd apps/web
|
|
- mkdir -p config && touch config/when.yaml
|
|
- touch .env
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- pnpm run check
|
|
- pnpm run lint
|
|
|
|
test:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- cd apps/web
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- pnpm run test:coverage
|
|
|
|
e2e:
|
|
image: git.eleith.com/eleith.private/playwright:1.61.1-node26
|
|
commands:
|
|
- cd apps/web
|
|
- pnpm run test:e2e
|
|
|
|
check-version:
|
|
image: node:26
|
|
commands:
|
|
- cd apps/web
|
|
- |
|
|
VERSION_FROM_TAG="${CI_COMMIT_TAG#@when/web@}"
|
|
VERSION_FROM_PKG=$(node -p "require('./package.json').version")
|
|
|
|
if [ "$VERSION_FROM_TAG" != "$VERSION_FROM_PKG" ]; then
|
|
echo "Version mismatch: Git tag version $VERSION_FROM_TAG does not match package.json version: $VERSION_FROM_PKG"
|
|
exit 1
|
|
fi
|
|
when:
|
|
- event: tag
|
|
|
|
extract-semver-tags:
|
|
image: alpine/git:latest
|
|
commands:
|
|
- |
|
|
VERSION_FULL="${CI_COMMIT_TAG#@when/web@}"
|
|
VERSION_MAJOR=$(echo "$VERSION_FULL" | cut -d. -f1)
|
|
VERSION_MINOR=$(echo "$VERSION_FULL" | cut -d. -f2)
|
|
|
|
SEMVER_FULL="$VERSION_FULL"
|
|
SEMVER_MAJOR_MINOR="$VERSION_MAJOR.$VERSION_MINOR"
|
|
SEMVER_MAJOR="$VERSION_MAJOR"
|
|
|
|
echo "Extracted versions: $SEMVER_FULL, $SEMVER_MAJOR_MINOR, $SEMVER_MAJOR"
|
|
echo -e "$SEMVER_FULL\n$SEMVER_MAJOR\n$SEMVER_MAJOR_MINOR" >> .tags
|
|
cat .tags
|
|
when:
|
|
- event: tag
|
|
|
|
build-docker-main:
|
|
image: woodpeckerci/plugin-docker-buildx:6.0.3
|
|
settings:
|
|
repo: git.eleith.com/eleith.private/when
|
|
username: eleith
|
|
dockerfile: apps/web/Dockerfile
|
|
context: .
|
|
registry: https://git.eleith.com
|
|
tags:
|
|
- latest
|
|
password:
|
|
from_secret: gitea_docker_registry
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
|
|
build-docker-tag:
|
|
image: woodpeckerci/plugin-docker-buildx:6.0.3
|
|
settings:
|
|
repo: git.eleith.com/eleith.private/when
|
|
username: eleith
|
|
dockerfile: apps/web/Dockerfile
|
|
context: .
|
|
registry: https://git.eleith.com
|
|
tags_file: .tags
|
|
password:
|
|
from_secret: gitea_docker_registry
|
|
when:
|
|
- event: tag
|
|
|
|
notify-success:
|
|
image: deblan/woodpecker-email:3.2.0
|
|
settings:
|
|
dsn:
|
|
from_secret: woodpecker_email_dsn
|
|
from:
|
|
address:
|
|
from_secret: woodpecker_email_from_address
|
|
name:
|
|
from_secret: woodpecker_email_from_name
|
|
recipients:
|
|
from_secret: woodpecker_email_recipient
|
|
level: success
|
|
recipients_only: true
|
|
when:
|
|
- event: [push, tag]
|
|
status: [success]
|
|
|
|
notify-failure:
|
|
image: deblan/woodpecker-email:3.2.0
|
|
settings:
|
|
dsn:
|
|
from_secret: woodpecker_email_dsn
|
|
from:
|
|
address:
|
|
from_secret: woodpecker_email_from_address
|
|
name:
|
|
from_secret: woodpecker_email_from_name
|
|
recipients:
|
|
from_secret: woodpecker_email_recipient
|
|
level: failure
|
|
recipients_only: true
|
|
when:
|
|
- event: [push, tag]
|
|
status: [failure]
|