ci: polish publishing via ci pipelines

This commit is contained in:
Rainer Killinger
2023-08-03 13:52:19 +00:00
parent cbc59795b7
commit 69fe8c6ac8
8 changed files with 39 additions and 27 deletions

View File

@@ -7,14 +7,18 @@
# ```
# To your pipeline.
# https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-rules-to-add-jobs
.limit_pipelines:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'main' || $CI_COMMIT_BRANCH == 'develop'
when: on_success
- when: never
include:
- local: /backend/backend/.gitlab-ci.yml
- local: /frontend/app/.gitlab-ci.yml
- local: /.gitlab/schedules.gitlab-ci.yml
- local: /.gitlab/publishing.gitlab-ci.yml
rules:
- if: '$CI_COMMIT_MESSAGE =~ /ci: publish release$/'
when: always
variables:
TURBO_CACHE_BYPASS:
@@ -83,6 +87,7 @@ build:
- if: $CI_COMMIT_BRANCH == 'develop'
variables:
DEPLOY_ID: staging
- !reference [.limit_pipelines, rules]
stop review:
stage: build
@@ -121,15 +126,15 @@ unit:
coverage_format: cobertura
path: coverage.xml
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'main' || $CI_COMMIT_BRANCH == 'develop'
- !reference [.limit_pipelines, rules]
audit:
stage: audit
allow_failure: true
needs: []
script:
- pnpm audit --prod
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'develop'
allow_failure: true
- if: $CI_COMMIT_BRANCH == 'main'
allow_failure: false
- !reference [.limit_pipelines, rules]