1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

CI: .murdock: get CI_BASE_COMMIT from previous merge for bors builds

This commit is contained in:
Kaspar Schleiser 2023-02-03 20:39:01 +01:00
parent 0fb6a09598
commit 76d8a7e732

View File

@ -178,6 +178,15 @@ check_label() {
return $?
}
is_bors_build() {
test "${CI_BUILD_BRANCH}" = "staging" || test "${CI_BUILD_BRANCH}" = "trying"
}
if test -z "${CI_BASE_COMMIT}" && is_bors_build ; then
previous_merge="$(git log --merges --max-count 1 --skip 1 --pretty=format:%H)"
export CI_BASE_COMMIT="${previous_merge}"
fi
# fullbuild logic
# non-full-builds are those where can_fast_ci_run might reduce the build
# automatically
@ -193,12 +202,13 @@ if [ -z "${FULL_BUILD}" ]; then
export FULL_BUILD
fi
# quickbuild logic
# a "quickbuild" is only building a representative subset of all build
# configurations.
if [ -z "${QUICK_BUILD}" ]; then
export QUICK_BUILD=0
if [ "${CI_BUILD_BRANCH}" = "staging" ] || [ "${CI_BUILD_BRANCH}" = "trying" ]; then
if is_bors_build ; then
# always do full build for bors' branches
true
elif [ ${FULL_BUILD} -eq 1 ]; then