CI/Cirrus: Skip merge_base step for non-PRs #20390

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:cirrus_nonpr_fix changing 1 files +1 −0
  1. luke-jr commented at 8:13 PM on November 14, 2020: member

    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.

  2. 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.
    20e491ddcb
  3. DrahtBot added the label Tests on Nov 14, 2020
  4. decryp2kanon commented at 2:40 PM on November 15, 2020: contributor

    Concept ACK

  5. in .cirrus.yml:32 in 20e491ddcb
      28 | @@ -29,6 +29,7 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
      29 |    depends_releases_cache:
      30 |      folder: "/tmp/cirrus-ci-build/releases"
      31 |    merge_base_script:
      32 | +    - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
    


    MarcoFalke commented at 5:11 PM on November 15, 2020:

    does this exit the whole task or continue with the next script?

    Would be good to link to a successful build, so that it can be checked.


    luke-jr commented at 6:39 PM on November 15, 2020:

    It continues with the next script.

    Here's how I tested it: https://cirrus-ci.com/task/4944025117523968

  6. MarcoFalke commented at 6:59 AM on November 16, 2020: member

    review ACK 20e491ddcb2617472c15294067768e8ce122499a

  7. MarcoFalke merged this on Nov 16, 2020
  8. MarcoFalke closed this on Nov 16, 2020

  9. sidhujag referenced this in commit 3e9b6e8c22 on Nov 16, 2020
  10. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me