Hello,
I’ve managed to set up drone (version 1.0.0-rc6) with gitea on a Synology NAS. I can access to the web UI and see all my repos there. The problem comes that no matter what I do, the build process never starts.
Here is how I run the drone docker image:
docker run \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--volume=/volume1/docker/drone:/data \
--env=DRONE_GITEA_SERVER=my_server:33000 \
--env=DRONE_GIT_ALWAYS_AUTH=false \
--env=DRONE_RUNNER_CAPACITY=2 \
--env=DRONE_SERVER_HOST=my_server \
--env=DRONE_SERVER_PROTO=https \
--env=DRONE_TLS_AUTOCERT=false \
--env=DRONE_TLS_CERT=/data/server.crt \
--env=DRONE_TLS_KEY=/data/server.key \
--env=DRONE_LOGS_TEXT=false \
--env=DRONE_LOGS_PRETTY=true \
--env=DRONE_LOGS_COLOR=true \
--env=DRONE_LOGS_DEBUG=true \
--env=DRONE_DATABASE_DRIVER=sqlite3 \
--env=DRONE_DATABASE_DATASOURCE=/data/database.sqlite \
--env=DRONE_RUNNER_OS=linux \
--env=DRONE_RUNNER_ARCH=amd64 \
--env=DRONE_SERVER_PORT=:33003 \
--env=DRONE_DATADOG_ENDPOINT=https://stats.drone.ci/api/v1/series \
--publish=33002:80 \
--publish=33003:443 \
--restart=always \
--detach=true \
--name=drone \
drone/drone:1.0.0-rc.6
Here is an example of my .drone.yml:
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: test
image: gcc
commands:
- make
privileged: true
And here are the logs:
Gitea logs
[Macaron] 2019-03-09 00:00:05: Started GET /api/v1/repos/user/test/hooks for 172.17.0.1
[Macaron] 2019-03-09 00:00:05: Completed GET /api/v1/repos/user/test/hooks 200 OK in 501.266911ms
[Macaron] 2019-03-09 00:00:05: Started POST /api/v1/repos/user/test/hooks for 172.17.0.1
[Macaron] 2019-03-09 00:00:06: Completed POST /api/v1/repos/user/test/hooks 201 Created in 373.135493ms
Drone logs
{
"level": "debug",
"msg": "api: root access granted",
"name": "test",
"namespace": "repo",
"request-id": "xxx",
"time": "2019-03-09T00:00:05Z",
"user.admin": true,
"user.login": "name"
},
{
"level": "debug",
"msg": "api: root access granted",
"name": "test",
"namespace": "repo",
"request-id": "xxx",
"time": "2019-03-09T00:00:05Z",
"user.admin": true,
"user.login": "name"
},
{
"fields.time": "2019-03-09T00:00:06Z",
"latency": 1031940580,
"level": "debug",
"method": "POST",
"msg": "",
"remote": "172.17.0.1:59561",
"request": "/api/repos/repo",
"request-id": "xxx",
"time": "2019-03-09T00:00:06Z"
},
{
"fields.time": "2019-03-09T00:00:06Z",
"latency": 1058216,
"level": "debug",
"method": "GET",
"msg": "",
"remote": "172.17.0.1:59561",
"request": "/api/badges/repo/status.svg",
"request-id": "xxx",
"time": "2019-03-09T00:00:06Z"
}
Webhook request
Request URL: url
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: cb0a5a7e-8991-4559-89d6-0f07894e1326
X-GitHub-Event: push
X-Gitea-Delivery: cb0a5a7e-8991-4559-89d6-0f07894e1326
X-Gitea-Event: push
X-Gogs-Delivery: cb0a5a7e-8991-4559-89d6-0f07894e1326
X-Gogs-Event: push
{
"secret": "xxx",
"ref": "refs/heads/master",
"before": "4207d8e40f0a56af624fcc2a76ceb37be6646cbf",
"after": "4207d8e40f0a56af624fcc2a76ceb37be6646cbf",
"compare_url": "",
"commits": [
{
"id": "4207d8e40f0a56af624fcc2a76ceb37be6646cbf",
"message": "test\n",
"url": "url",
"author": {
"name": "name",
"email": "email",
"username": ""
},
"committer": {
"name": "name",
"email": "email",
"username": ""
},
"verification": null,
"timestamp": "0001-01-01T00:00:00Z"
}
],
"repository": {
"id": 42,
"owner": {
"id": 1,
"login": "username",
"full_name": "name",
"email": "email",
"avatar_url": "https://secure.gravatar.com/avatar/04ad38c9e35bb1a3d18ff2a5f831b203?d=identicon",
"language": "es-ES",
"username": "username"
},
"name": "test",
"full_name": "repo",
"description": "",
"empty": false,
"private": true,
"fork": false,
"parent": null,
"mirror": false,
"size": 36,
"html_url": "url",
"ssh_url": "url",
"clone_url": "urlt",
"website": "",
"stars_count": 0,
"forks_count": 0,
"watchers_count": 1,
"open_issues_count": 0,
"default_branch": "master",
"archived": false,
"created_at": "2019-03-08T23:22:10Z",
"updated_at": "2019-03-08T23:53:06Z",
"permissions": {
"admin": false,
"push": false,
"pull": false
}
},
"pusher": {
"id": 1,
"login": "username",
"full_name": "name",
"email": "email",
"avatar_url": "https://secure.gravatar.com/avatar/04ad38c9e35bb1a3d18ff2a5f831b203?d=identicon",
"language": "es-ES",
"username": "username"
},
"sender": {
"id": 1,
"login": "username",
"full_name": "name",
"email": "email",
"avatar_url": "https://secure.gravatar.com/avatar/04ad38c9e35bb1a3d18ff2a5f831b203?d=identicon",
"language": "es-ES",
"username": "username"
}
}
Webhook response
Connection: keep-alive
Content-Length: 166
Content-Type: text/html
Date: Sat, 09 Mar 2019 00:30:04 GMT
Keep-Alive: timeout=20
Server: nginx
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>
To me it seems that drone and gitea are working fine, and that there is a problem with nginx (as per the webhook response logs), but I’m not sure about that and, in that case, I don’t know how I can resolve it. I would appreciate if anyone could point me or suggest me how I can solve this 405 Not allowed error.
Thanks in advance.