From 297e27171a6c97d7120cca799b0756f8cb2ac238 Mon Sep 17 00:00:00 2001 From: Alina Date: Tue, 17 Feb 2026 22:20:31 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B9=D0=BA=D0=B0=20CI/CD=20=D0=B4=D0=B5=D0=BF=D0=BB=D0=BE?= =?UTF-8?q?=D1=8F=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20ci-templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавлены service.yaml, .drone.yml и корневой package.json с workspaces. Обновлён vite.config.ts (code splitting: antd, x6), .gitignore (.ci, .claude, .serena). Co-Authored-By: Claude Opus 4.6 --- .drone.yml | 40 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ CLAUDE.md | 9 +++++++++ frontend/vite.config.ts | 11 ++++++++++- package.json | 5 +++++ service.yaml | 7 +++++++ 6 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 .drone.yml create mode 100644 package.json create mode 100644 service.yaml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..df66686 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,40 @@ +kind: pipeline +type: kubernetes +name: ci + +steps: + - name: prepare + image: alpine:3.19 + environment: + GITEA_TOKEN: + from_secret: GITEA_TOKEN + commands: + - apk add --no-cache git bash yq + - git clone --depth 1 https://token:$GITEA_TOKEN@git.vigdorov.ru/vigdorov/ci-templates.git .ci + - chmod +x .ci/scripts/*.sh + - bash .ci/scripts/prepare.sh + + - name: build + image: gcr.io/kaniko-project/executor:v1.23.2-debug + depends_on: [prepare] + environment: + HARBOR_USER: + from_secret: HARBOR_USER + HARBOR_PASSWORD: + from_secret: HARBOR_PASSWORD + commands: + - /busybox/sh .ci/scripts/build.sh + + - name: deploy + image: alpine:3.19 + depends_on: [build] + environment: + KUBE_CONFIG: + from_secret: KUBE_CONFIG + commands: + - apk add --no-cache bash yq kubectl helm + - bash .ci/scripts/deploy.sh + +trigger: + branch: [master, main] + event: [push, custom] diff --git a/.gitignore b/.gitignore index de40431..16cd309 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ dist-ssr .idea .vscode *.sw? +.ci +.claude +.serena diff --git a/CLAUDE.md b/CLAUDE.md index d6b4039..7978a4d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,6 +31,15 @@ test-x6/ └── ARCHITECTURE.md # Детальная архитектура ``` +## Деплой + +- **Namespace:** test-x6 (отдельный) +- **CI/CD:** Drone CI через ci-templates (service.yaml + .drone.yml) +- **Тип:** web-frontend (SPA → nginx) +- **Registry:** registry.vigdorov.ru/library/test-x6 +- **Домен:** test-x6.vigdorov.ru +- **Trigger:** push в main + ## Ключевые документы - `ARCHITECTURE.md` — архитектура, модель данных, API, фазы реализации diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 8b0f57b..08f293f 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,7 +1,16 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' -// https://vite.dev/config/ export default defineConfig({ plugins: [react()], + build: { + rollupOptions: { + output: { + manualChunks: { + antd: ['antd', '@ant-design/icons'], + x6: ['@antv/x6', '@antv/x6-react-shape'], + }, + }, + }, + }, }) diff --git a/package.json b/package.json new file mode 100644 index 0000000..cb75f20 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "name": "test-x6", + "private": true, + "workspaces": ["frontend"] +} diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..6f7bdff --- /dev/null +++ b/service.yaml @@ -0,0 +1,7 @@ +service: + name: test-x6 + type: web-frontend + +deploy: + namespace: test-x6 + domain: test-x6.vigdorov.ru