mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-08 13:11:35 +03:00
add branch workflow
This commit is contained in:
parent
1856c310ca
commit
ae30445723
@ -17,8 +17,7 @@ generate-pipeline:
|
||||
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\/.*/'
|
||||
- if: '$CI_COMMIT_BRANCH == "stage"'
|
||||
|
||||
trigger-downstream:
|
||||
stage: trigger
|
||||
@ -43,5 +42,4 @@ trigger-downstream:
|
||||
AWS_SECRET_ACCESS_KEY: ${S3_SECRET_KEY}
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'
|
||||
- if: '$CI_COMMIT_BRANCH =~ /^feature\/.*/'
|
||||
- if: '$CI_COMMIT_BRANCH == "stage"'
|
||||
|
||||
@ -73,8 +73,7 @@ validate-${job_prefix}:
|
||||
- terragrunt validate
|
||||
rules:
|
||||
- if: '\$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
- if: '\$CI_COMMIT_BRANCH == "master" || \$CI_COMMIT_BRANCH == "main"'
|
||||
- if: '\$CI_COMMIT_BRANCH =~ /^feature\/.*/'
|
||||
- if: '\$CI_COMMIT_BRANCH == "stage"'
|
||||
- if: '\$CI_PIPELINE_SOURCE == "pipeline"'
|
||||
interruptible: true
|
||||
artifacts:
|
||||
@ -114,9 +113,8 @@ plan-${job_prefix}:
|
||||
- terragrunt init -upgrade -reconfigure
|
||||
- terragrunt plan -out=tfplan
|
||||
rules:
|
||||
- if: '\$CI_COMMIT_BRANCH == "master" || \$CI_COMMIT_BRANCH == "main"'
|
||||
- if: '\$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
- if: '\$CI_COMMIT_BRANCH =~ /^feature\/.*/'
|
||||
- if: '\$CI_COMMIT_BRANCH == "stage"'
|
||||
- if: '\$CI_PIPELINE_SOURCE == "pipeline"'
|
||||
interruptible: true
|
||||
artifacts:
|
||||
@ -158,11 +156,9 @@ apply-${job_prefix}:
|
||||
- terragrunt init -upgrade -reconfigure
|
||||
- terragrunt apply -auto-approve
|
||||
rules:
|
||||
- if: '\$CI_COMMIT_BRANCH == "master" || \$CI_COMMIT_BRANCH == "main"'
|
||||
- if: '\$CI_COMMIT_BRANCH == "stage"'
|
||||
when: ${when_clause}
|
||||
- if: '\$CI_COMMIT_BRANCH =~ /^feature\/.*/'
|
||||
when: ${when_clause}
|
||||
- if: '\$CI_PIPELINE_SOURCE == "pipeline"'
|
||||
- if: '\$CI_PIPELINE_SOURCE == "pipeline" && \$CI_COMMIT_BRANCH == "stage"'
|
||||
when: ${when_clause}
|
||||
interruptible: true
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user