There are several routes available for managing the status of jobs being processed by the build server.
Create a new job (equivalent to /docker-build)
Example Request:
curl -s -XPOST http://localhost:5000/jobs -d '{"account":"modcloth","repo":"docker-builder","ref":"master"}'Example Response:
{
"account": "modcloth",
"completed": "0001-01-01T00:00:00Z",
"created": "2014-07-06T14:02:01.92446296-07:00",
"id": "035c4ea0-d73b-5bde-7d6f-c806b04f2ec3",
"log_route": "/jobs/035c4ea0-d73b-5bde-7d6f-c806b04f2ec3/tail?n=100",
"ref": "master",
"repo": "docker-builder",
"status": "created"
}Get a list of all jobs
Example Request:
curl -s -XGET http://localhost:5000/jobsExample Response:
{
"035c4ea0-d73b-5bde-7d6f-c806b04f2ec3": {
"account": "modcloth",
"completed": "0001-01-01T00:00:00Z",
"created": "2014-07-06T14:02:01.92446296-07:00",
"id": "035c4ea0-d73b-5bde-7d6f-c806b04f2ec3",
"log_route": "/jobs/035c4ea0-d73b-5bde-7d6f-c806b04f2ec3/tail?n=100",
"ref": "master",
"repo": "docker-builder",
"status": "created"
}
}Get info job :id
Example Request:
curl -s -XGET http://localhost:5000/jobs/035c4ea0-d73b-5bde-7d6f-c806b04f2ec3Example Response:
{
"account": "modcloth",
"completed": "0001-01-01T00:00:00Z",
"created": "2014-07-06T14:02:01.92446296-07:00",
"id": "035c4ea0-d73b-5bde-7d6f-c806b04f2ec3",
"log_route": "/jobs/035c4ea0-d73b-5bde-7d6f-c806b04f2ec3/tail?n=100",
"ref": "master",
"repo": "docker-builder",
"status": "created"
}Get the last n lines of the log from job :id
Example Request:
curl -s -XGET http://localhost:5000/jobs/035c4ea0-d73b-5bde-7d6f-c806b04f2ec3/tail?n=100Example Response:
// ... 100 lines worth of logs