10

Installed Drone 0.8 on virtual machine with the following Docker Compose file:

version: '2'

services:
  drone-server:
    image: drone/drone:0.8
    ports:
      - 8080:8000
      - 9000:9000
    volumes:
      - /var/lib/drone:/var/lib/drone/
    restart: always
    environment:
      - DATABASE_DRIVER=sqlite3
      - DATABASE_CONFIG=/var/lib/drone/drone.sqlite
      - DRONE_OPEN=true
      - DRONE_ORGS=my-github-org
      - DRONE_ADMIN=my-github-user
      - DRONE_HOST=${DRONE_HOST}
      - DRONE_GITHUB=true
      - DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
      - DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
      - DRONE_SECRET=${DRONE_SECRET}
      - GIN_MODE=release

  drone-agent:
    image: drone/agent:0.8
    restart: always
    depends_on: [ drone-server ]
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET=${DRONE_SECRET}

All variable values are stored in .env file and are correctly passed to running containers. Trying to run a build using private Github repository. When pushing to repository for the first time build starts and fails with the following error (i.e. build fails): first-run Then after clicking on Restart button seeing another screen (i.e. build is pending): second-run

Having the following containers running on the same machine:

root@ci:~# docker ps -a
CONTAINER ID        IMAGE               COMMAND               CREATED             STATUS              PORTS                                                             NAMES
94e6a266e09d        drone/agent:0.8     "/bin/drone-agent"    2 hours ago         Up 2 hours                                                                            root_drone-agent_1
7c7d9f93a532        drone/drone:0.8     "/bin/drone-server"   2 hours ago         Up 2 hours          80/tcp, 443/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:8080->8000/tcp   root_drone-server_1

Even with DRONE_DEBUG=true the only log entry in agent log is:

2017/09/10 15:11:54 pipeline: request next execution

So I think for some reason my agent does not get the build from the queue. I noticed that latest Drone versions are using GRPC instead of WebSockets.

So how to get the build started? What I am missing here?

vania-pooh
  • 2,933
  • 4
  • 24
  • 42
  • 1
    The invalid or missing image indicates your yaml file is invalid and cannot be parsed. Your build is therefore given an error status, and immediately fails. This does not look like a setup issue to me. This looks like a yaml issue. Therefore I would recommend posting your project's yaml file. – Brad Rydzewski Sep 11 '17 at 15:08

1 Answers1

1

The reason of the issue - wrong .drone.yml file. Only the first red screen should be shown in that case. Showing pending and Restart button for incorrect YAML is a Drone issue.

vania-pooh
  • 2,933
  • 4
  • 24
  • 42