(Gareth Harcombe Minson)
I’m testing out the github deployment api integration, and our deployment model is to tag the repo and then create a new deployment with the API.
If I try this, my clone task fails because drone tries to checkout
/refs/heads/TAG, which is not valid.
Didn’t find any newer topic about this so I’m bumping it I’ve just got the same issue. The deployment event sends this:
And then Drone tries to:
+ git fetch --no-tags origin +refs/heads/1.0.0:
fatal: Couldn't find remote ref refs/heads/1.0.0
Wouldn’t it be possible, in case of a deployment event, to use “sha” instead of “ref” when cloning? This works:
git fetch 3ef...
Didn’t look at the code to see how its handled though.
Trying to deploy a commit ref does not work either… the fetch does not actually fetch the ref, but fetched the master instead:
+ git fetch --no-tags origin +refs/heads/master:
+ git reset --hard -q 3ef...
fatal: Could not parse object '3ef....
Although the webhook sent the ref correctly:
And the ref “3ef…” is not even in the master branch. Probably somewhere in the clone logic it decided to get the default branch instead.