From f598e54a834dd4bf62d2f4dc2c104e6055f5d84f Mon Sep 17 00:00:00 2001 From: Lorenzo Pagliai <lorenzo.pagliai@seco.com> Date: Fri, 11 Nov 2022 11:09:48 +0100 Subject: [PATCH] Insert testing.yml for testing purpose --- common.yml | 33 --------------------------------- testing.yml | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 33 deletions(-) create mode 100644 testing.yml diff --git a/common.yml b/common.yml index 02e4e94..63dcadc 100644 --- a/common.yml +++ b/common.yml @@ -27,39 +27,6 @@ variables: variables: # Include git submodules GIT_SUBMODULE_STRATEGY: recursive - rules: - # Explicitly allow externally triggered pipelines in every case - - if: $CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "api" - # Do not run pipelines on forked projects. - # The pipelines would not work anyway because of the users permissions. - # There are two cases catched here: - # 1. The project is forked into someones gitlab namespace and a MR to - # include a change into this forked project is created. In this case - # is the CI_PROJECT_ROOT_NAMESPACE not seco-ne but the - # namespace the fork lives in. - # 2. The MR from the forked project is created to merge the change into this - # the project in the seco-ne namespace (customer sending - # change to us). Here the the IDs used below differ. - # - - if: $CI_PROJECT_ROOT_NAMESPACE != "seco-ne" - when: never - - if: $CI_MERGE_REQUEST_SOURCE_PROJECT_ID != $CI_MERGE_REQUEST_PROJECT_ID - when: never - # FIXME: Unfortunately we cannot use variables in regular expressions due to a - # GitLab limitation: https://gitlab.com/gitlab-org/gitlab/-/issues/209904 - # As soon as this get fixed, use the regex based rules below instead of checking - # against the MASTER_BRANCH variable. - # Run pipeline if target branch of the merge request has an integration target, i.e. - # INTEGRATION contains a line beginning with the target branch followed by a colon. - # This also implies that the pipeline runs in merge request context only. - # - if: $INTEGRATION =~ /^$CI_MERGE_REQUEST_TARGET_BRANCH_NAME:/m - - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $MASTER_BRANCH - # Run pipeline on target branch after merging a merge request. - # - if: $INTEGRATION =~ /^$CI_COMMIT_BRANCH:/m - - if: $CI_COMMIT_BRANCH == $MASTER_BRANCH - - if: $CI_MERGE_REQUEST_IID - - if: $CI_PIPELINE_SOURCE == "schedule" - when: always .yamllint: extends: .infrastructure diff --git a/testing.yml b/testing.yml new file mode 100644 index 0000000..1eafbe4 --- /dev/null +++ b/testing.yml @@ -0,0 +1,14 @@ +stages: + - testing + +testing: + stage: testing + tags: + - infrastructure + timeout: 10m + image: secodocker/manifest-test:vtemp + tags: + - if: $CI_PIPELINE_SOURCE == "schedule" + when: always + script: + - echo ${CI_PROJECT_ROOT_NAMESPACE} -- GitLab