My Git repo is on a Gogs server with the drone webhook configured.
When a add a new release, gogs doesn’t trigger the webhook but I opened an issue on the Gogs project.
Then I thought, why not add the tag manually ? Which is what I did and this time, Gogs sent to Drone a tag notification.
Drone didn’t trigger any build so I ran in the webhook configuration and saw that Drone answered a 200 OK to Gogs but with an empty body.
The payload of the request is :
{
“secret”: “xxxxxxxxxxxxxxxxxxxxxxx”,
“ref”: “v9”,
“ref_type”: “tag”,
“repository”: {
“id”: 3,
“owner”: {
“id”: 3,
“username”: “MyOrga”,
“full_name”: “My Orga”,
“email”: “”,
“avatar_url”: “https://gogs.xxx.yyy/avatars/3”
},
“name”: “my-project”,
“full_name”: “MyOrga/my-project”,
“description”: “”,
“private”: false,
“fork”: false,
“html_url”: “https://gogs.xxx.yyy/MyOrga/my-project”,
“ssh_url”: “ssh://git@gogs.xxx.yyy:10022/MyOrga/my-project.git”,
“clone_url”: “https://gogs.xxx.yyy/MyOrga/my-project.git”,
“website”: “”,
“stars_count”: 0,
“forks_count”: 0,
“watchers_count”: 2,
“open_issues_count”: 0,
“default_branch”: “master”,
“created_at”: “2016-01-27T18:10:26+01:00”,
“updated_at”: “2016-11-23T17:09:02+01:00”
},
“sender”: {
“id”: 8,
“username”: “me”,
“full_name”: “Me”,
“email”: “me@xxx.yyy”,
“avatar_url”: “https://secure.gravatar.com/avatar/aaaaaaaaaaaaaaaaaaa”
}
}
The Drone response has empty body, here are the headers :
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value
Content-Length: 0
Content-Type: text/plain; charset=utf-8
Date: Thu, 24 Nov 2016 08:30:48 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Last-Modified: Thu, 24 Nov 2016 08:30:48 GMT
X-Content-Type-Options: nosniff
X-Drone-Version: 0.4.0-beta+0
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Ma .drone.yml file is :
clone:
__skip_verify: true
__tags: true
publish:
__docker-latest:
____image: “plugins/drone-docker”
____registry: ‘artifactory.xxx.yyy:5003’
____insecure: true
____username: drone
____password: $$ARTIFACTORY_PASSWORD
____email: me@xxx.yyy
____repo: my-proj
____tag:
______- latest
____when:
______event: push
______branch: master
__docker:
____registry: ‘artifactory.xxx.yyy:5003’
____insecure: true
____username: drone
____password: $$ARTIFACTORY_PASSWORD
____email: me@xxx.yyy
____repo: my-proj
____tag:
______- stable
______- “$$TAG”
____when:
______event: tag
(sorry for indent but I could’nt find any better way)
Would you have any hint on what I could do ?
I’m almost sure it has already worked.