mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
CI: .murdock: add some docs to CI_BASE_BRANCH and is_bors_build()
This commit is contained in:
parent
76d8a7e732
commit
49da7a446a
8
.murdock
8
.murdock
@ -178,10 +178,18 @@ check_label() {
|
|||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# this function returns 0 when this is build is building one of the two bors
|
||||||
|
# branches ("staging" or "trying", 1 otherwise.
|
||||||
is_bors_build() {
|
is_bors_build() {
|
||||||
test "${CI_BUILD_BRANCH}" = "staging" || test "${CI_BUILD_BRANCH}" = "trying"
|
test "${CI_BUILD_BRANCH}" = "staging" || test "${CI_BUILD_BRANCH}" = "trying"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set CI_BASE_COMMIT in case of a bors build.
|
||||||
|
# This assumes that bors always adds a single merge commit (possibly itself
|
||||||
|
# including multiple merges for PRs) on the base branch.
|
||||||
|
# That git command outputs the hash of the second merge commit (the one before
|
||||||
|
# the topmost merge), which should be the base branch HEAD.
|
||||||
|
# (CI_BASE_COMMIT is used by `can_fast_ci_run.py` to only build changes.)
|
||||||
if test -z "${CI_BASE_COMMIT}" && is_bors_build ; then
|
if test -z "${CI_BASE_COMMIT}" && is_bors_build ; then
|
||||||
previous_merge="$(git log --merges --max-count 1 --skip 1 --pretty=format:%H)"
|
previous_merge="$(git log --merges --max-count 1 --skip 1 --pretty=format:%H)"
|
||||||
export CI_BASE_COMMIT="${previous_merge}"
|
export CI_BASE_COMMIT="${previous_merge}"
|
||||||
|
Loading…
Reference in New Issue
Block a user