Skip to content
Snippets Groups Projects

Fix the CI config for the DC branches (clean backport from DC_Oct23)

Merged Pierre-Alain Loizeau requested to merge p.-a.loizeau/cbmroot:dc_fix_CI into master
1 file
+ 13
4
Compare changes
  • Side-by-side
  • Inline
+ 13
4
@@ -18,6 +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
@@ -26,8 +27,8 @@ RebaseCheck:
- 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)
- hash1=$(git show-ref upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME | cut -f1 -d' ')
- hash2=$(git merge-base upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD)
- echo "${hash1}"
- echo "${hash2}"
- if [ "${hash1}" = "${hash2}" ]; then
@@ -51,6 +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_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
@@ -59,7 +61,7 @@ LinearHistCheck:
- apk update && apk add git bash
- scripts/connect_upstream_repo.sh $CI_MERGE_REQUEST_PROJECT_URL
- git fetch upstream
- count=$(git rev-list --min-parents=2 --count upstream/master..HEAD)
- count=$(git rev-list --min-parents=2 --count upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME..HEAD)
- echo "${count}"
- if [ 0 = "${count}" ]; then
- echo "History introduced in fork is linear"
@@ -79,6 +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_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
@@ -141,6 +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_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
@@ -159,6 +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_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
@@ -178,6 +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_.*$/
script:
# Get the upstream repository manually. I did not find any other way to have it for
# comparison
@@ -517,7 +523,10 @@ CbmRoot_Continuous:
BuildOnlineContainerMR:
stage: package
only:
- merge_requests
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_PROJECT_PATH == "computing/cbmroot" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
needs:
- CodeFormatCheck
- FileFormatCheck
Loading