]
Eyal Edri updated OVIRT-2446:
-----------------------------
Status: To Do (was: Blocked)
Github push trigger will fail if was trigger by a tag push
----------------------------------------------------------
Key: OVIRT-2446
URL:
https://ovirt-jira.atlassian.net/browse/OVIRT-2446
Project: oVirt - virtualization made easy
Issue Type: New Feature
Reporter: Roy Golan
Assignee: infra
When pushing a tag to a GH it triggers the jenkins webhook. In the invoked
job,
it will try to fech a new head with that tag, but that will fail since the
repo doesn't have
a head since it is started as git init.
A breakdown from
https://jenkins.ovirt.org/job/oVirt_ovirt-openshift-extensions_standard-o...
- git init a repo
*14:57:15* > git init
/home/jenkins/workspace/oVirt_ovirt-openshift-extensions_standard-on-ghpush/ovirt-openshift-extensions
# timeout=10
- git fetch tags (maybe the problem is here as it doesn't reffer to refs/tags)
*15:35:07* [check-merged.el7.x86_64] > git fetch --tags --progress
https://gerrit.ovirt.org/jenkins +refs/heads/*:refs/remotes/origin/*
- fetch upstream changes, which is here a tag v0.3.2, so it uses
'refs/tags/v0.3.2'
*14:57:18* > git fetch --tags --progress
https://github.com/oVirt/ovirt-openshift-extensions
+refs/tags/v0.3.2:myhead
This fails with
*14:57:19* stderr: error: cannot update ref 'refs/heads/myhead':
trying to write non-commit object
3c7b5a5d243d1f3bcecbe7b527726b06113d0ec5 to branch 'refs/heads/myhead'
While in regular merge with a tag on it uses 'refs/heads/master':
*15:35:10* [check-merged.el7.x86_64] > git fetch --tags --progress
https://gerrit.ovirt.org/jenkins +refs/heads/master:myhead
Since refs/tags/v0.3.2 doesn't exist locally it can't reference it. Since
refs/heads/master exists locally it can create the alias 'myhead' to it.
I would like to have the option to push a tag and trigger a build but this
is not working atm without a commit attached to it.