This commit is contained in:
Your Name
2026-04-03 02:04:40 +05:00
parent 3f81732bf6
commit 94e57cb333
2228 changed files with 179382 additions and 8 deletions
+11 -7
View File
@@ -1,6 +1,6 @@
# GitLab CI pipeline for marketing-parser.
# CI: runs Maven unit tests, enforces JaCoCo coverage, and publishes reports on merge requests and protected-branch pushes.
# CD: existing publish job pushes the Docker image to ghcr.io on push to main/master.
# CD: existing publish job pushes the Docker image to ghcr.io on push to analyze-graphics.
# Optional: SSH deploy when CI/CD variable ENABLE_SSH_DEPLOY=true and deploy secrets are set.
#
# CI/CD variables (Settings → CI/CD → Variables):
@@ -11,12 +11,16 @@
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
default:
tags:
- marketing-parser
workflow:
rules:
# Merge requests whose target branch is main or master
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master")
# Direct pushes to main or master
- if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master")
# Merge requests whose target branch is analyze-graphics
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "analyze-graphics"
# Direct pushes to analyze-graphics
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "analyze-graphics"
# Manual pipeline (Run pipeline in UI)
- if: $CI_PIPELINE_SOURCE == "web"
@@ -54,7 +58,7 @@ docker-build-push:
stage: publish
needs: [build-and-test]
rules:
- if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master")
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "analyze-graphics"
image: docker:24-cli
services:
- docker:24-dind
@@ -74,7 +78,7 @@ deploy:
stage: deploy
needs: [docker-build-push]
rules:
- if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master") && $ENABLE_SSH_DEPLOY == "true"
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "analyze-graphics" && $ENABLE_SSH_DEPLOY == "true"
image: alpine:3.20
before_script:
- apk add --no-cache openssh-client