Thanks for the next response.
docker-compose.yml from doc is:
depends_on: [ drone-server ]
docker ps is:
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
docker exec -it yyy /drone, I show the help, but impossible to trigger
How to trigger a build for the repo xxxx/yyyy?
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.
Thanks for your answer.
But actually, I just test drone on my computer (the address is 0.0.0.0).
But I want to force build with a command because the hooks doesn’t work.
drone start xxx/yyy)
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.
curl -X POST --data @payload.json \
-H "Content-Type: application/json" \
-H "X-GitHub-Delivery: 55c50d00-c223-11e6-934e-724510b231d7" \
-H "X-GitHub-Event: push" \
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 http://readme.drone.io/cli/drone-exec/
Big thanks, I’ve just used
BUT… are-you shure that there’s no commad-line
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
Thanks for all!
Sorry for my english syntaxe.