CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
xxxxxxxxxxxx drone/drone:0.5 "/drone agent" .... ago Up ... 8000/tcp drone_drone-agent_1
yyyyyyyyyyyy drone/drone:0.5 "/drone server" ... ago Up ... 0.0.0.0:80->8000/tcp drone_drone-server_1
My question is : How to trigger a build for the repo xxxx/yyyy?
I try docker exec -it yyy /drone, I show the help, but impossible to trigger
When you activate a repository in the drone user interface, drone adds post-commit hooks to your repository in GitHub (or Bitbucket, etc). When you push to your repository, GitHub uses the webhook to trigger a build in Drone.
So one triggers a Drone build by pushing code to the repository.
Please note there is no way to trigger a new build outside of webhooks. Drone is built and optimized to work with webhooks.
You can use a service like ngrok to expose your local drone instance to github. Ngrok will tunnel traffic from its servers to your laptop. See https://ngrok.com/
You can also attempt to manually curl the drone server and send the GitHub payload. You will need to accurately re-construct the GitHub message, including headers and payload, and webhook url with token, which you can find in the GitHub user interface.
The above command is what I use locally when testing.
Alternatively if you do not need the drone user interface, you can run builds directly from the command line without a drone server, using the drone exec command. See drone exec | Drone
Yes, I am sure. There is no command to launch a new build like this (ie fetch HEAD from GitHub). There are commands to launch new builds for commits that already exist in the Drone database. I do not believe, however, this is going to solve your issue.
There is a command to re-start an existing build:
drone build start foo/bar 1
There is a command to re-start an existing build with a new build number (good for nighty jobs):
drone build start --fork foo/bar 1
There is a command to run a build locally from the command line and write the results to your console. This is intended for locally testing your yaml configuration, and does not contact the drone server