0

Im trying drone 0.5 with bitbucket server, And it seems connected because i can see my repositories. But it keeps saying that it does not have any builds yet. I added the drone.yml to my repo but nothing... am i missing something

Ramonskie
  • 13
  • 1
  • 4
  • can you confirm you activated your repository in the UI and the hook was correctly added to bitbucket? Can you confirm the hook URL is something publicly accessible that bitbucket can post to (ie not localhost or an internal company IP). When you commit a change to your repository, bitbucket will send a hook to drone. Can you confirm via the logs (using DRONE_DEBUG=true) that drone is receiving the request from Bitbucket? Can you check the logs for errors processing the hook? Please update the issue with the requested details so I can help answer your question. Thanks! – Brad Rydzewski Aug 25 '16 at 18:52

1 Answers1

1

I noticed that you said you:

I added the drone.yml to my repo

however that would be problematic because you have to add a:

.drone.yml

note that the correct file has a "." in front of it.

Additionally you should be trying to manually type in the authorization url to give drone access to your bitbucket account (ps drone wont work without some kind of scm set up) an example of the authorization url would be:

https://my.exampleurl.com/authorize

These are similar to the same instructions you can find here: http://readme.drone.io/admin/installation-guide/


I often see people post links like this and then someone will ask them to have copied the link's content into the actual response so I am going to do that here (you know just in case the link flys away):

Drone is distributed as a single binary file inside a scratch Docker image. Docker is the only dependency. This guide demonstrates how to install Drone using docker-compose.

Example Docker compose file with GitHub integration:

    version: '2'

    services:
      drone-server:
        image: drone/drone:0.5
        ports: [ 80:8000 ]
        volumes: [ ./drone:/var/lib/drone/ ]
        restart: always
        environment:
          - DRONE_OPEN=true
          - DRONE_GITHUB=true
          - DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
          - DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
          - DRONE_SECRET=${DRONE_SECRET}

      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}

Drone integrates with multiple version control providers, configured using environment variables. This example demonstrates basic GitHub integration.

You will need to register Drone with GitHub to obtain an oauth2 client and secret. The authorization callback url should match :///authorize

    services:
      drone-server:
        image: drone/drone:0.5
        ports: [ 80:8000 ]
        volumes: [ ./drone:/var/lib/drone/ ]
        restart: always
        environment:
          - DRONE_OPEN=true
    +     - DRONE_GITHUB=true
    +     - DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
    +     - DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
          - DRONE_SECRET=${DRONE_SECRET}

Drone mounts a volume on the host machine to persist the sqlite database. This is not required when using alternate database engines.

    services:
      drone-server:
        image: drone/drone:0.5
        ports: [ 80:8000 ]
    +   volumes: [ ./drone:/var/lib/drone/ ]
        restart: always

Drone agents require access to the host machine Docker daemon.

    services:
      drone-agent:
        image: drone/drone:0.5
        command: agent
        restart: always
        depends_on: [ drone-server ]
    +   volumes: [ /var/run/docker.sock:/var/run/docker.sock ]

Drone agents require the server address for agent-to-server communication. Your server URL should use the wss:// protocol when TLS is enabled

    services:
      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}

Drone server and agents use a shared secret to authenticate communication. This should be a random string of your choosing and should be kept private.

    services:
      drone-server:
        image: drone/drone:0.5
        ports: [ 80:8000 ]
        volumes: [ ./drone:/var/lib/drone/ ]
        restart: always
        environment:
          - DRONE_OPEN=true
          - DRONE_GITHUB=true
          - DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
          - DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
    +     - DRONE_SECRET=${DRONE_SECRET}

      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}

Drone registration is closed by default. This example enables open registration for users that are members of approved GitHub organizations.

    services:
      drone-server:
        image: drone/drone:0.5
        ports: [ 80:8000 ]
        volumes: [ ./drone:/var/lib/drone/ ]
        restart: always
        environment:
    +     - DRONE_OPEN=true
    +     - DRONE_ORGS=dolores,dogpatch
          - DRONE_GITHUB=true
          - DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
          - DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
          - DRONE_SECRET=${DRONE_SECRET}
Noah Heil
  • 11
  • 1