Compare commits

...

3 Commits

Author SHA1 Message Date
f08784598d Gzip'in
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
2026-02-16 13:15:59 -03:00
9201cb6f23 Typos
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
2026-02-12 02:02:07 -03:00
f9223c2852 Pipeline edits 2026-02-12 02:00:29 -03:00
3 changed files with 235 additions and 79 deletions

View File

@@ -7,62 +7,194 @@ when:
- event: manual - event: manual
steps: steps:
install: - name: install
image: node:22-bookworm-slim image: node:22-bookworm-slim
commands: commands:
- corepack enable - corepack enable
- corepack prepare pnpm@latest --activate - corepack prepare pnpm@latest --activate
- pnpm install --frozen-lockfile - pnpm install --frozen-lockfile
lint: - name: lint
image: node:22-bookworm-slim image: node:22-bookworm-slim
commands: commands:
- corepack enable && corepack prepare pnpm@latest --activate - corepack enable && corepack prepare pnpm@latest --activate
- pnpm run lint - pnpm run lint
depends_on: depends_on:
- install - install
check: - name: Send Lint Status Notification (failure)
image: node:22-bookworm-slim image: curlimages/curl
commands: environment:
- corepack enable && corepack prepare pnpm@latest --activate MATTERMOST_BOT_ACCESS_TOKEN:
- pnpm run check from_secret: mattermost_bot_access_token
depends_on: MATTERMOST_CHANNEL_ID:
- lint from_secret: mattermost_tests_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands:
- |
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Lint failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on:
- lint
when:
- status: [failure]
test: - name: check
image: node:22-bookworm-slim image: node:22-bookworm-slim
commands: commands:
- corepack enable && corepack prepare pnpm@latest --activate - corepack enable && corepack prepare pnpm@latest --activate
- pnpm run test:run - pnpm run check
depends_on: depends_on:
- check - lint
build: - name: Send Svelte Check Status Notification (failure)
image: node:22-bookworm-slim image: curlimages/curl
commands: environment:
- corepack enable && corepack prepare pnpm@latest --activate MATTERMOST_BOT_ACCESS_TOKEN:
- pnpm run build from_secret: mattermost_bot_access_token
depends_on: MATTERMOST_CHANNEL_ID:
- test from_secret: mattermost_tests_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands:
- |
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Svelte Check failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on:
- check
when:
- status: [failure]
build-full: - name: Unit Tests
image: node:22-bookworm-slim image: node:22-bookworm-slim
commands: commands:
- apt-get update - corepack enable && corepack prepare pnpm@latest --activate
- apt-get install -y --no-install-recommends ca-certificates libasound2 libatk-bridge2.0-0 libatk1.0-0 libcups2 libdrm2 libgbm1 libgtk-3-0 libnss3 libxcomposite1 libxdamage1 libxfixes3 libxkbcommon0 libxrandr2 - pnpm run test:run
- rm -rf /var/lib/apt/lists/* depends_on:
- corepack enable && corepack prepare pnpm@latest --activate - check
- pnpm run critical-css:install
- pnpm run build:full
depends_on:
- build
e2e: - name: Send Test Status Notification (failure)
image: node:22-bookworm-slim image: curlimages/curl
commands: environment:
- corepack enable && corepack prepare pnpm@latest --activate MATTERMOST_BOT_ACCESS_TOKEN:
- pnpm exec playwright install chromium --with-deps from_secret: mattermost_bot_access_token
- pnpm run test:e2e MATTERMOST_CHANNEL_ID:
depends_on: from_secret: mattermost_tests_channel_id
- build MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands:
- |
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Test failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on:
- Unit Tests
when:
- status: [failure]
- name: build
image: node:22-bookworm-slim
commands:
- corepack enable && corepack prepare pnpm@latest --activate
- pnpm run build
depends_on:
- Unit Tests
- name: Send Build Status Notification (failure)
image: curlimages/curl
environment:
MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_tests_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands:
- |
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Build failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on:
- build
when:
- status: [failure]
- name: build-full
image: node:22-bookworm-slim
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates libasound2 libatk-bridge2.0-0 libatk1.0-0 libcups2 libdrm2 libgbm1 libgtk-3-0 libnss3 libxcomposite1 libxdamage1 libxfixes3 libxkbcommon0 libxrandr2
- rm -rf /var/lib/apt/lists/*
- corepack enable && corepack prepare pnpm@latest --activate
- pnpm run critical-css:install
- pnpm run build:full
depends_on:
- build
- name: Send Build Full Status Notification (failure)
image: curlimages/curl
environment:
MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_tests_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands:
- |
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Build Full failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on:
- build-full
when:
- status: [failure]
- name: E2E Tests
image: node:22-bookworm-slim
commands:
- corepack enable && corepack prepare pnpm@latest --activate
- pnpm exec playwright install chromium --with-deps
- pnpm run test:e2e
depends_on:
- build
- name: Send E2E Status Notification (failure)
image: curlimages/curl
environment:
MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_tests_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands:
- |
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] E2E failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on:
- E2E Tests
when:
- status: [failure]
- name: Send CI Pipeline Status Notification (success)
image: curlimages/curl
environment:
MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_tests_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands:
- |
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] CI pipeline success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on:
- install
- lint
- check
- Unit Tests
- build
- build-full
- E2E Tests
when:
- status: [success]

View File

@@ -48,12 +48,16 @@ steps:
- name: Send Docker Image Build Status Notification (success) - name: Send Docker Image Build Status Notification (success)
image: curlimages/curl image: curlimages/curl
environment: environment:
DISCORD_WEBHOOK_URL: MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: discord_webhook_url from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_pushes_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands: commands:
- | - |
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Docker image build success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Docker image build success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on: depends_on:
- Docker image build - Docker image build
when: when:
@@ -62,12 +66,16 @@ steps:
- name: Send Docker Image Build Status Notification (failure) - name: Send Docker Image Build Status Notification (failure)
image: curlimages/curl image: curlimages/curl
environment: environment:
DISCORD_WEBHOOK_URL: MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: discord_webhook_url from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_pushes_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands: commands:
- | - |
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Docker image build failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Docker image build failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on: depends_on:
- Docker image build - Docker image build
when: when:
@@ -103,12 +111,16 @@ steps:
- name: Send Push to Registry Status Notification (success) - name: Send Push to Registry Status Notification (success)
image: curlimages/curl image: curlimages/curl
environment: environment:
DISCORD_WEBHOOK_URL: MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: discord_webhook_url from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_pushes_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands: commands:
- | - |
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Push to registry success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Push to registry success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on: depends_on:
- Push to registry - Push to registry
when: when:
@@ -117,12 +129,16 @@ steps:
- name: Send Push to Registry Status Notification (failure) - name: Send Push to Registry Status Notification (failure)
image: curlimages/curl image: curlimages/curl
environment: environment:
DISCORD_WEBHOOK_URL: MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: discord_webhook_url from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_pushes_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands: commands:
- | - |
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Push to registry failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Push to registry failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on: depends_on:
- Push to registry - Push to registry
when: when:
@@ -151,12 +167,16 @@ steps:
- name: Send Deploy Status Notification (success) - name: Send Deploy Status Notification (success)
image: curlimages/curl image: curlimages/curl
environment: environment:
DISCORD_WEBHOOK_URL: MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: discord_webhook_url from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_pushes_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands: commands:
- | - |
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Production Deploy success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on: depends_on:
- Trigger Portainer stack redeploy - Trigger Portainer stack redeploy
when: when:
@@ -165,12 +185,16 @@ steps:
- name: Send Deploy Status Notification (failure) - name: Send Deploy Status Notification (failure)
image: curlimages/curl image: curlimages/curl
environment: environment:
DISCORD_WEBHOOK_URL: MATTERMOST_BOT_ACCESS_TOKEN:
from_secret: discord_webhook_url from_secret: mattermost_bot_access_token
MATTERMOST_CHANNEL_ID:
from_secret: mattermost_pushes_channel_id
MATTERMOST_POST_API_URL:
from_secret: mattermost_post_api_url
commands: commands:
- | - |
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Production Deploy failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
depends_on: depends_on:
- Trigger Portainer stack redeploy - Trigger Portainer stack redeploy
when: when:

View File

@@ -17,7 +17,7 @@ services:
- 'traefik.http.routers.mifi-dev.rule=Host(`mifi.dev`) || Host(`www.mifi.dev`)' - 'traefik.http.routers.mifi-dev.rule=Host(`mifi.dev`) || Host(`www.mifi.dev`)'
- 'traefik.http.routers.mifi-dev.entrypoints=websecure' - 'traefik.http.routers.mifi-dev.entrypoints=websecure'
- 'traefik.http.routers.mifi-dev.service=mifi-dev' - 'traefik.http.routers.mifi-dev.service=mifi-dev'
- 'traefik.http.routers.mifi-dev.middlewares=security-supermax-with-analytics@file,redirect-www-to-non-www@file' - 'traefik.http.routers.mifi-dev.middlewares=gzip@file,security-supermax-with-analytics@file,redirect-www-to-non-www@file'
- 'traefik.http.routers.mifi-dev.tls=true' - 'traefik.http.routers.mifi-dev.tls=true'
- 'traefik.http.routers.mifi-dev.tls.certresolver=letsencrypt' - 'traefik.http.routers.mifi-dev.tls.certresolver=letsencrypt'
- 'traefik.http.services.mifi-dev.loadbalancer.server.port=80' - 'traefik.http.services.mifi-dev.loadbalancer.server.port=80'
@@ -25,7 +25,7 @@ services:
- 'traefik.http.routers.mifi-bio.rule=Host(`mifi.bio`) || Host(`www.mifi.bio`)' - 'traefik.http.routers.mifi-bio.rule=Host(`mifi.bio`) || Host(`www.mifi.bio`)'
- 'traefik.http.routers.mifi-bio.entrypoints=websecure' - 'traefik.http.routers.mifi-bio.entrypoints=websecure'
- 'traefik.http.routers.mifi-bio.service=mifi-bio' - 'traefik.http.routers.mifi-bio.service=mifi-bio'
- 'traefik.http.routers.mifi-bio.middlewares=security-supermax-with-analytics@file,redirect-www-to-non-www@file' - 'traefik.http.routers.mifi-bio.middlewares=gzip@file,security-supermax-with-analytics@file,redirect-www-to-non-www@file'
- 'traefik.http.routers.mifi-bio.tls=true' - 'traefik.http.routers.mifi-bio.tls=true'
- 'traefik.http.routers.mifi-bio.tls.certresolver=letsencrypt' - 'traefik.http.routers.mifi-bio.tls.certresolver=letsencrypt'
- 'traefik.http.services.mifi-bio.loadbalancer.server.port=80' - 'traefik.http.services.mifi-bio.loadbalancer.server.port=80'