gogs-webhook-plugin icon indicating copy to clipboard operation
gogs-webhook-plugin copied to clipboard

gogs-webhook didn't support gogs release event

Open sagaii opened this issue 6 years ago • 11 comments

  • Gogs version (or commit ref):
  • Jenkins version: Jenkins ver. 2.107.3
  • Jenkins modules used in combination with gogs-webhook-plugin:
  • JSON Output of webhook: {"result":"ERROR","message":"Only push event can be accepted."}

Description

I had tried to config my gogs system to support auto release my test version to work version.
so i hope in gogs system create one repo version , it will send out one webhook event . in fact, gogs had support the funciton. i had choosed event of repo release . it give out this post data:

Request URL: http://jenkins.address/gogs-webhook/?job=releasedb/copytest Request method: POST Content-Type: application/json X-Gogs-Delivery: 7f96dbfc-c93a-4247-8528-0c7e1566c53d X-Gogs-Event: release X-Gogs-Signature: 03cfb231c9c643277fae62bd318538e9e77157c630cb1373e7f37ab84cc14e94

I had read gogs=webhook source code , in webhook.java , it only receive "push" event. so , i hope it can add "release" and other's event.

thx.

...

sagaii avatar Jun 05 '18 09:06 sagaii

@sagaii what should the release event do other then triggering a job?

sanderv32 avatar Jun 05 '18 18:06 sanderv32

Gogs-webhook receive release event , triggering a job. and the job can execute deploy work,t example copy program from test environment to production environment.

sagaii avatar Jun 09 '18 11:06 sagaii

in this gogs-webhook didn't support release event. so i only use build token root plugin , create a url link to triggering a job.

sagaii avatar Jun 09 '18 11:06 sagaii

It's not so hard to also make it respond to a release event but that will do exactly the same as a push event.

sanderv32 avatar Jun 09 '18 18:06 sanderv32

yes, i think so . it same as a push event. but i need it . :) .

sagaii avatar Jun 10 '18 05:06 sagaii

hello i would also need a feature like this, the jenkins plugin should react on tag creation, reacting on release creation would also work, since it basically creates a tag.

schlitzered avatar Aug 17 '18 14:08 schlitzered

Hello I also need this feature, I have different jobs that should run based on the type of the event: release or push

fseidler avatar Aug 17 '18 22:08 fseidler

+1

aeciopires avatar Sep 01 '18 11:09 aeciopires

+1

trrtly avatar Nov 21 '18 04:11 trrtly

+1

toan267 avatar Jan 03 '19 06:01 toan267

Opened PR #62 for this.

sanderv32 avatar Jul 19 '19 00:07 sanderv32