Skip to content
Snippets Groups Projects
Commit d565b42e authored by jurgenhaas's avatar jurgenhaas
Browse files

#64 CI improvements for private modules

parent bad8ab94
Branches
No related tags found
No related merge requests found
...@@ -5,51 +5,38 @@ default: ...@@ -5,51 +5,38 @@ default:
workflow: workflow:
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables: - if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH =~ "/^feature\/.*/"
PRIVATE_MODULE_TESTS: "false"
PRIVATE_MODULE_BUILD: "true"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
variables:
PRIVATE_MODULE_TESTS: "false"
PRIVATE_MODULE_BUILD: "true"
when: always
- if: $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH =~ "/^feature\/.*/"
variables:
PRIVATE_MODULE_TESTS: "true"
PRIVATE_MODULE_BUILD: "true"
when: always
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
variables:
PRIVATE_MODULE_TESTS: "false"
PRIVATE_MODULE_BUILD: "true"
when: always
- when: never
include: include:
- remote: https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/includes/include.drupalci.main.yml - remote: https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/includes/include.drupalci.main.yml
rules: rules:
- if: $PRIVATE_MODULE_TESTS == "true" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always when: never
- if: $CI_COMMIT_TAG
when: never
- remote: https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/includes/include.drupalci.variables.yml - remote: https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/includes/include.drupalci.variables.yml
rules: rules:
- if: $PRIVATE_MODULE_TESTS == "true" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always when: never
- if: $CI_COMMIT_TAG
when: never
- remote: https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/includes/include.drupalci.workflows.yml - remote: https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/includes/include.drupalci.workflows.yml
rules: rules:
- if: $PRIVATE_MODULE_TESTS == "true" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always when: never
- if: $CI_COMMIT_TAG
when: never
- local: private-modules-overrides.yml - local: private-modules-overrides.yml
rules: rules:
- if: $PRIVATE_MODULE_TESTS == "true" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always when: never
- if: $CI_COMMIT_TAG
when: never
- project: gitlab-ci-cd/general - project: gitlab-ci-cd/general
ref: main ref: main
file: '/mixins.yml' file: '/mixins.yml'
- project: 'gitlab-ci-cd/composer-packages' - project: 'gitlab-ci-cd/composer-packages'
ref: main ref: main
file: '/composer-packages.yml' file: '/composer-packages.yml'
rules:
- if: $PRIVATE_MODULE_BUILD == "true"
when: always
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment