aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2020-11-14 17:35:12 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2020-11-14 17:51:59 +0000
commit20e491ddcb2617472c15294067768e8ce122499a (patch)
tree08d3aef5a7c624c6f4af0b5824b3c21c741f4ec6
parent543693b92b954d186cb466a2f14b480f3bcf8c0b (diff)
CI/Cirrus: Skip merge_base step for non-PRs
CIRRUS_BASE_BRANCH is a PR-specific variable and undocumented on non-PR builds. In practice (at the moment), it seems to be HEAD, which in private repositories can be pretty much anything, causing CI to fail if it can't be cleanly merged. By checking CIRRUS_PR first, we can reliably do CI builds of branches outside PRs.
-rw-r--r--.cirrus.yml1
1 files changed, 1 insertions, 0 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 415aa549f1..237560fc2e 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -29,6 +29,7 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
depends_releases_cache:
folder: "/tmp/cirrus-ci-build/releases"
merge_base_script:
+ - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
- bash -c "$PACKAGE_MANAGER_INSTALL git"
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
- git config --global user.email "ci@ci.ci"