Add runner-based auto deploy for marketing-parser

This commit is contained in:
Codex
2026-04-12 21:36:17 +05:00
parent 09ab38d738
commit 2c12b4940d
6 changed files with 346 additions and 0 deletions
+30
View File
@@ -2,9 +2,13 @@ image: eclipse-temurin:21-jdk
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
DEPLOY_DIR: "/home/gitlab-runner/deploy/marketing-parser"
PARSER_IMAGE_NAME: "marketing-parser-app"
PARSER_CONTAINER_NAME: "konturai-parser-app"
stages:
- test
- deploy
cache:
key: ${CI_COMMIT_REF_SLUG}
@@ -24,3 +28,29 @@ test:
reports:
junit:
- target/surefire-reports/TEST-*.xml
deploy_production:
stage: deploy
needs:
- test
tags:
- marketing-parser-prod
variables:
DOCKER_HOST: ""
DOCKER_TLS_VERIFY: ""
DOCKER_CERT_PATH: ""
DOCKER_TLS_CERTDIR: ""
COMPOSE_FILE: "$DEPLOY_DIR/deployment/docker-compose.server.yml"
COMPOSE_PROJECT_NAME: "marketing-parser"
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "web"'
before_script:
- command -v bash >/dev/null
- command -v docker >/dev/null
- command -v rsync >/dev/null
script:
- bash scripts/deploy_gitlab.sh
environment:
name: production
resource_group: marketing-parser-production