-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto tag build fails when tag event has no commit sha (Gogs) #229
Comments
I haven't seen that kind of issue so far, and we are using auto tags for all plugins. |
Adding Maybe not including the hash on tag events is unexpected behavior from the gogs webhook? |
Indeed it's known and documented, gogs does not provide the SHA on tag events. https://github.com/drone/drone/blob/5b6a3d8ff4c37283cf37df20d871cc8dfe439565/service/hook/parser/parse.go#L181 Basically I can imagine a few flavors to fix this.
To me, the later makes the most sense. What do you think @tboerger? Edit: #230 is example of the later option |
I prefer this is fixed at the Drone server level, and we do not make any major changes to the Docker plugin. This plugin is largely frozen and must remain very stable, since it is critical to the Drone ecosystem. In terms of a temporary workaround I would support setting a random value in the Name field when the commit sha is empty. + if plugin.Build.Name == "" {
+ plugin.Build.Name = uniuri.New()
+ }
return plugin.Exec()
} |
So, what is the temporary solution? |
As Gitea received a fix, and the lib drone/go-scm#22 also includes this fix, and I'm pretty sure since than Drone updated this dep I would guess that latest releases of Gitea and Drone will work properly. Please upgrade to the latest releases, check if it works, and if it fails report it here. |
@tboerger the issue for me applies to gogs, not gittea. I've been running |
As this is an upstream issue you should push the Gogs issue :) |
Sort of. Kind of. I would agree. Either way I did: And had zero response. I suppose it highlights why gittea exists. |
The upstream fix landed in the develop branch. Hopefully it'll work next release 👍 |
@bradrydzewski @Beanow @tboerger Tried today with latest versions of Gogs (0.11.89.0728) and Drone Server and Agent 1.2.3 Gogs sends this payload to Drone which comes with the SHA
However when building the docker image it fails
I created an intermediate container to print all environments variables and the SHA is not present.
What am I missing? |
Previous versions of Gogs did not provide the sha in the tag create webhook. It is great to see that Gogs is now providing the sha, however, that does not mean that Drone will automatically read the sha. Someone now needs to add code to For example, when Gitea added the sha value to the webhook someone sent us this pull request to read the sha drone/go-scm#22. |
Hi @marcotuna , |
This is only the case for old Gogs version, upgrade your Gogs instance. |
The build is trigged by a tag event as you would assume:
username created tag 2.1.5
However the tag seems to be parsed incorrectly.
Using drone server and agent docker tags: 1.0
Build image step:
The text was updated successfully, but these errors were encountered: