Skip to content
Snippets Groups Projects
Commit 421f5e3c authored by Damian Alvarez's avatar Damian Alvarez
Browse files

Merge branch 'bs-merge-request-pipelines-2022' into '2022'

{CI} Enable pipelines for merge requests for 2022 branch

See merge request hps-public/easybuild-repository!855
parents 1c30ba34 1f012f96
Branches
Tags
No related merge requests found
......@@ -2,6 +2,19 @@ default:
tags: [ public-docker ]
image: $CI_REGISTRY/easybuild-docker/easybuild-docker/centos8-eb-test:latest
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
variables:
BASE_COMMIT: $CI_MERGE_REQUEST_DIFF_BASE_SHA
TIP_COMMIT: $CI_COMMIT_SHA
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
when: never
- if: '$CI_COMMIT_BRANCH'
variables:
BASE_COMMIT: $CI_COMMIT_BEFORE_SHA
TIP_COMMIT: $CI_COMMIT_SHA
check_style:
script:
- export SYSTEMNAME="juwelsbooster" # Make this the default for packages like NVHPC
......@@ -18,12 +31,8 @@ check_style:
- done
- export EASYBUILD_MODULE_NAMING_SCHEME="FlexibleCustomHierarchicalMNS"
- faulty=""
- TARGET_COMMIT=$(git rev-parse origin/$CI_DEFAULT_BRANCH)
# If these 2 are equal that implies an update in-place, not a MR, so the reference SHA has to be the previous one
- if [ $TARGET_COMMIT == $CI_COMMIT_SHA ]; then
- TARGET_COMMIT=$CI_COMMIT_BEFORE_SHA
- fi
- eb_list=$(git diff-tree --no-commit-id -r $TARGET_COMMIT $CI_COMMIT_SHA | awk '{print($5,$6)}' | grep -e '^M' -e '^A' | awk '{print($2)}' | { grep -e "eb\$" || $(which true); })
- printf "Checking changes between base %s (%s) and tip %s (%s)\n" "$BASE_COMMIT" "$(git describe --all --exclude pipeline/* $BASE_COMMIT 2> /dev/null)" "$TIP_COMMIT" "$(git describe --all --exclude pipeline/* $TIP_COMMIT 2> /dev/null)"
- eb_list=$(git diff-tree --no-commit-id -r "$TIP_COMMIT" "$BASE_COMMIT" | awk '$5 ~ /^M|^A/ && $6 ~ /eb$/ {print($6)}')
- echo "List of files to be checked $eb_list"
- for i in $eb_list; do
- echo "Checking $(basename $i) ..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment