From 607e26c22446fd32088a9321c7071d260758f85d Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Thu, 31 Aug 2023 12:16:06 +0000 Subject: [PATCH] Add new logic into CI system to name pipelines based on the type of the pipeline. --- .gitlab-ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a84756e3aa..da64987d43 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ variables: EXIT_CODE_FAIL: 1 PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" + IVAS_PIPELINE_NAME: '' MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." value: 'default' @@ -25,14 +26,26 @@ default: # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: + name: '$IVAS_PIPELINE_NAME' rules: # see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" when: never - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + variables: + IVAS_PIPELINE_NAME: 'MR pipeline: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME' - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main + variables: + IVAS_PIPELINE_NAME: 'Push pipeline: $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Scheduled in main - - if: $CI_PIPELINE_SOURCE == 'web' # for testing + variables: + IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'default' # for testing + variables: + IVAS_PIPELINE_NAME: 'Web run pipeline: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-be-release' + variables: + IVAS_PIPELINE_NAME: 'Test BE to release pipeline: $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'trigger' stages: -- GitLab