CI/CD: ci, deploy-ift и deploy-stage через EventHubDevOps; фиксы calendar view, archive, API-тесты, traefik-coraza
Deploy IFT (core) / deploy-ift-core (push) Failing after 22m58s
CI / test (push) Failing after 22m59s

This commit is contained in:
2026-07-08 14:50:59 +03:00
parent 4cb6056917
commit f4746df4a2
15 changed files with 247 additions and 53 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# ВРЕМЕННО ОТКЛЮЧЕНО — CI/CD требует донастройки (см. EventHubBack#23).
# Устарело — заменено на ci.yml и deploy-ift.yml / deploy-stage.yml (EventHubDevOps).
# Ручной запуск: Actions → Run workflow
name: Test & Deploy to Snapdeploy
name: Test & Deploy to Snapdeploy (legacy)
on:
workflow_dispatch:
# on:
+34
View File
@@ -0,0 +1,34 @@
name: CI
on:
push:
branches: [master, main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build eventhub image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
load: true
tags: eventhub:latest
- name: Build API test image
uses: docker/build-push-action@v4
with:
context: .
file: docker/ApiTests.Dockerfile
load: true
tags: eventhub-api-tests:latest
- name: Run API tests (local CT)
run: docker run --rm eventhub-api-tests:latest
+65
View File
@@ -0,0 +1,65 @@
name: Deploy IFT (core)
on:
push:
branches: [master, main]
workflow_dispatch:
jobs:
deploy-ift-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to registry
uses: docker/login-action@v2
with:
registry: git.sabilin.com
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push eventhub
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
push: true
tags: git.sabilin.com/eventhub/eventhub:ift
- name: Build and push traefik-coraza
uses: docker/build-push-action@v4
with:
context: docker/traefik
file: docker/traefik/Dockerfile
push: true
tags: git.sabilin.com/eventhub/traefik-coraza:ift
- name: Build and push fallback
uses: docker/build-push-action@v4
with:
context: docker/fallback
file: docker/fallback/Dockerfile
push: true
tags: git.sabilin.com/eventhub/fallback:ift
- name: Build and push bot-emulator
uses: docker/build-push-action@v4
with:
context: .
file: test/emulate_users/Dockerfile
push: true
tags: git.sabilin.com/eventhub/bot-emulator-users:ift
- name: Deploy core on IFT via SSH
uses: appleboy/ssh-action@v0.1.5
with:
host: ${{ secrets.IFT_SSH_HOST }}
username: ${{ secrets.IFT_SSH_USER }}
key: ${{ secrets.IFT_SSH_PRIVATE_KEY }}
script: |
export REGISTRY_USER='${{ secrets.REGISTRY_USER }}'
export REGISTRY_PASSWORD='${{ secrets.REGISTRY_PASSWORD }}'
/opt/eventhub-ift/devops/scripts/deploy-service.sh ift core
+13 -15
View File
@@ -1,15 +1,13 @@
# ВРЕМЕННО ОТКЛЮЧЕНО — CI/CD требует донастройки.
# Ручной запуск: Actions → Run workflow
name: Deploy to Stage
name: Deploy stage (core)
on:
push:
tags:
- 'v*'
workflow_dispatch:
# on:
# push:
# tags:
# - 'v*'
jobs:
deploy-stage:
deploy-stage-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -17,7 +15,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Gitea Container Registry
- name: Login to registry
uses: docker/login-action@v2
with:
registry: git.sabilin.com
@@ -34,18 +32,18 @@ jobs:
- name: Build and push bot-emulator
uses: docker/build-push-action@v4
with:
context: ./docker/bot-emulator-users
context: .
file: test/emulate_users/Dockerfile
push: true
tags: git.sabilin.com/eventhub/bot-emulator-users:stage
- name: Deploy to stage server
- name: Deploy core on stage via SSH
uses: appleboy/ssh-action@v0.1.5
with:
host: ${{ secrets.STAGE_SSH_HOST }}
username: ${{ secrets.STAGE_SSH_USER }}
key: ${{ secrets.STAGE_SSH_PRIVATE_KEY }}
script: |
cd /opt/eventhub-stage
docker pull git.sabilin.com/eventhub/eventhub:stage
docker pull git.sabilin.com/eventhub/bot-emulator-users:stage
docker stack deploy -c docker-compose.stage.yml eventhub-stage --with-registry-auth
export REGISTRY_USER='${{ secrets.REGISTRY_USER }}'
export REGISTRY_PASSWORD='${{ secrets.REGISTRY_PASSWORD }}'
/opt/eventhub-stage/devops/scripts/deploy-service.sh stage core