1

I've followed the installation instructions to set up a local drone server and agent via Docker containers. The Drone server is able to authenticate against my Github account and list all of my repos, however I am unable to actually trigger a build.

Have I set up something incorrectly?

.drone.yml config file:

build:
  image: 3.3.9-jdk-7
  pull: true
  commands:
    - mvn clean
    - mvn install
    - mvn deploy

enter image description here

Brad Rydzewski
  • 2,523
  • 14
  • 18
timmy
  • 1,752
  • 6
  • 23
  • 35

2 Answers2

2

Yes the problem is that you are not using the correct yaml syntax for the version of Drone that you have installed. I can see from the screenshot you are running drone 0.5 or higher, but you are using the 0.4 yaml syntax.

Instead of this:

build:
  image: 3.3.9-jdk-7
  pull: true
  commands:
    - mvn clean
    - mvn install
    - mvn deploy

It should be this:

pipeline:
  build:
    image: 3.3.9-jdk-7
    pull: true
    commands:
      - mvn clean
      - mvn install
      - mvn deploy

Here is a link to the official documentation, which has the canonical usage instructions and yaml specifications. http://readme.drone.io/usage/getting-started/

Brad Rydzewski
  • 2,523
  • 14
  • 18
  • Thanks! I originally followed the canonical example with the same result. My problem is more fundamental. The machine I am using to run the Docker container for the drone-server is behind a router and not publicly accessible. – timmy Jan 17 '17 at 01:18
0

With your current setup, on GitHub if you navigate to the ->settings->webhooks you will see a few of failed GitHub webhook calls. When ever a push event happens on your repository, GitHub will look to send a payload (HTTP POST) to your drone server. As your drone server is running locally, there is no way GitHub will know how to contact your drone server. You will need to host your drone server on a machine which will be accessible to GitHub. But you can use "drone exec" to trigger local builds. "exec" does not use webhooks.

Aditya
  • 85
  • 3