packit / dist-git-to-source-git

Converting dist-git to source-git
MIT License
4 stars 9 forks source link

processor: Push the branch and tags separately #121

Closed csomh closed 3 years ago

csomh commented 3 years ago

It seems that branches cannot be force-pushed (and they don't need to be), so first push the branch that was updated, then force push any tags that might be updated.

Signed-off-by: Hunor Csomortáni csomh@redhat.com

softwarefactory-project-zuul[bot] commented 3 years ago

Build succeeded.

jpopelka commented 3 years ago

I managed to reproduce the problem. The code in the current master is OK as long as we're updating an existing branch. But in this case, we created a new c8s branch and the force push was rejected probably because we already have sg-start tag in c8 branch.

The change in this PR doesn't help, it still leads to remote: Denied push for ref 'refs/tags/sg-start'. Trying to delete remote tag (git push --delete origin refs/tags/sg-start) before pushing the new one also results in remote: Denied push for ref 'refs/tags/sg-start'.

The only idea I have is to have the sg-start tag named differently in each branch, i.e. sg-start-c8 & sg-start-c8s because you can't have two tags (with the same name) in two branches anyway. It would require changes in packit, but should IMHO work.

softwarefactory-project-zuul[bot] commented 3 years ago

Build failed.