Builds running infinitly

I’ve installed drone.io in a linux server( droplet of DigitalOcean) from the latest docker image using this dronerc config file:
DRONE_GITHUB=true
DRONE_GITHUB_CLIENT=yyyyyyyyyyyyyyyy
DRONE_GITHUB_SECRET=zzzzzzzzzzzzzzzzzzzzzzzz
DRONE_SECRET=xxxxxxxxxxxxxxxxxxxxxx
DRONE_OPEN=true
DATABASE_DRIVER=sqlite3
DATABASE_CONFIG=/var/lib/drone/drone.sqlite

I activated one of my reprository in github. Everything seems to works but my builds are not finishing. See the image below

My question is why the build are not finishing? Am I missing something?

This would indicate to me that either you did not configure an agent, or the agent is not configured correctly. I recommend using the official documentation for reference when installing drone. See http://readme.drone.io/admin/installation-guide/

I re-install drone server and agent with this docker compose file:

drone-server_1 | time=“2017-04-27T11:14:52Z” level=warning msg=“agents can connect with token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoiSG9sZC1Qb3NzZXNzaW9uLUdyZWF0LUNvbnRlbnQtNiIsInR5cGUiOiJhZ2VudCJ9.Qfsbpks2KlxDGDOTRtH3x5uWtwDlKngi1VNjh-xdwds”

And after some logs I get this:

drone-agent_1 | rpc: error re-connecting: dial tcp 127.0.0.1:8000: getsockopt: connection refused

Seems like drone-agent cannot connect to drone server, I changed drone server’ address but nothing changes.

the configuration above does not match the suggested configuration in the documentation. You cannot use 127.0.0.1 because the server and agent have separate networks. This is why the documentation specifies ws://drone-server:8000/ws/broker

  drone-agent:
    image: drone/drone:0.5
    command: agent
    restart: always
    depends_on: [ drone-server ]
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
+     - DRONE_SERVER=ws://drone-server:8000/ws/broker
      - DRONE_SECRET=${DRONE_SECRET}

also note that you should be using drone/drone:0.5 as the image

Thank you ! I changed the drone server like in the installation guide and the drone version. My builds are finishing correctly!

I am new to drone and I don’t understand everything. I have one last question about builds. My github repository is a project written in go. I wrote some tests but seems like drone is just building the project ( not reading commands in the .drone.yml) because my tests should failed but drone specify that the builds are correct and they are finished correctly.
And the debug says:

drone-server_1 | time=“2017-04-27T13:18:03Z” level=debug msg="cannot find build secrets for yenden/JCVM. GET https://api.github.com/repos/yenden/JCVM/contents/.drone.yml.sig?ref=8acb70e792af8d7b26b1be8908fd10df755af5ba: 404 Not Found []"
drone-server_1 | time=“2017-04-27T13:18:03Z” level=debug msg=“cannot parse .drone.yml.sig file. square/go-jose: compact JWS format must have three parts”

Here is my .drone.yml:

build:
image: golang
commands:
- go get
- go build
- go test -v github.com/yenden/JCVM/test

The above yaml is incorrect … looks like you are using an outdated format. Please see http://readme.drone.io for the correct yaml format. I definitely recommend taking some time and reading through the official docs, since they should help you work through most of these types of issues.

Okey Thank you :slight_smile:

Hi, I know it has been long time but I still get the same error (cannot parse .drone.yml.sig file. square/go-jose: compact JWS format must have three parts)
I can’t came through this. Please help
Here is my .drone.yml file
pipeline:
build
image: golang:1.8
commands:
- go test -v test/jcreCredit_test.go

cc @bradrydzewski