MozillaSecurity / orion

CI/CD pipeline for building and publishing multiple 🐳 containers as microservices within a mono repository.
Mozilla Public License 2.0
47 stars 14 forks source link

Taskboot fails to checkout PR from a fork. #128

Open jschwartzentruber opened 3 years ago

jschwartzentruber commented 3 years ago

The PR is from https://github.com/jschwartzentruber/orion

We should use the clone URL of the fork, or git fetch pull/{n}/head before checkout.

[taskcluster 2021-05-26 15:29:10.621Z] === Task Starting ===
Linux 24bb6a3bf791 5.4.0-1029-gcp #31~18.04.1-Ubuntu SMP Thu Oct 22 09:43:51 UTC 2020 x86_64 Linux
INFO:root:Target setup in /tmp/taskboot.f3ojx7o5
INFO:taskboot.target:Cloning https://github.com/MozillaSecurity/orion @ dc63e916ba10f5f59e7e79836cd9cd462c04bd83
INFO:taskboot.target:Cloned into /tmp/taskboot.f3ojx7o5
fatal: reference is not a tree: dc63e916ba10f5f59e7e79836cd9cd462c04bd83
Traceback (most recent call last):
  File "/usr/bin/build", line 33, in <module>
    sys.exit(load_entry_point('orion-builder', 'console_scripts', 'build')())
  File "/src/orion-builder/src/orion_builder/build.py", line 102, in main
    target = Target(args)
  File "/usr/lib/python3.8/site-packages/taskboot/target.py", line 31, in __init__
  File "/usr/lib/python3.8/site-packages/taskboot/target.py", line 45, in clone
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
subprocess.CalledProcessError: Command '['git', 'checkout', 'dc63e916ba10f5f59e7e79836cd9cd462c04bd83', '-b', 'taskboot']' returned non-zero exit status 128.
[taskcluster 2021-05-26 15:29:14.492Z] === Task Finished ===
jschwartzentruber commented 2 years ago

This was fixed in 44a031a2d6cb8e60d0221125b1d16fb72d45ebc3, but it should be upstreamed to https://github.com/mozilla/task-boot