Skip to content
Snippets Groups Projects
Commit 45f9971d authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

Fix the CI config for the DC branches regexp usage

- Remove RebaseCheckDc job
- Fix regexp usage for DC branches
parent d877591b
Branches DC_Oct23
No related tags found
1 merge request!1439Fix the CI config for the DC branches regexp usage
Pipeline #25014 passed
......@@ -18,40 +18,7 @@ RebaseCheck:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "/^DC_.*$/"
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
# Check if a rebase is needed
# If a rebase is needed stop immediately
- apk update && apk add git bash
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- hash1=$(git show-ref upstream/master | cut -f1 -d' ')
- hash2=$(git merge-base upstream/master HEAD)
- echo "${hash1}"
- echo "${hash2}"
- if [ "${hash1}" = "${hash2}" ]; then
- echo "No rebase required"
- exit 0
- else
- echo "The Merge Request is not up-to-date"
- echo "Rebase is required"
- exit 1
- fi
RebaseCheckDc:
stage: checkRepository
variables:
GIT_DEPTH: 200
image: alpine
tags:
- docker
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "DC_Oct23"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
......@@ -85,7 +52,7 @@ LinearHistCheck:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "/^DC_.*$/"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
......@@ -114,7 +81,7 @@ CodeFormatCheck:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "/^DC_.*$/"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
......@@ -177,7 +144,7 @@ FileFormatCheck:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "/^DC_.*$/"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
......@@ -196,7 +163,7 @@ FileEndCheck:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "/^DC_.*$/"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
......@@ -216,7 +183,7 @@ FileLicenceCheck:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "/^DC_.*$/"
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^DC_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment