terraform-contour-mirror/.gitlab-ci.yml
kochetkov.s cd68e73e40 feat: Add Terraform infrastructure for pulse project
- Add modules: yc-s3, yc-postgresql, k8s-namespace, k8s-secrets
- Add live configuration for stage environment
- Add GitLab CI with downstream pipelines
- Implement best practices from theory.md
2026-01-19 15:15:14 +03:00

41 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Основной GitLab CI пайплайн для Terraform инфраструктуры
# Использует downstream pipelines для динамической генерации джоб
stages:
- generate
- trigger
# Генерация динамического пайплайна на основе структуры live/
generate-pipeline:
stage: generate
image: alpine:latest
before_script:
- apk add --no-cache bash findutils
script:
- ./scripts/generate-pipeline.sh
artifacts:
paths:
- .gitlab-ci.generated.yml
expire_in: 1 hour
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH =~ /^feature\/.*/'
tags:
- yc
# Запуск downstream пайплайна с сгенерированной конфигурацией
trigger-downstream:
stage: trigger
trigger:
include:
- artifact: .gitlab-ci.generated.yml
job: generate-pipeline
strategy: depend
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH =~ /^feature\/.*/'
tags:
- yc