빌드 정보
빌드 정보 (Build Info)
지정한 저장소 빌드를 반환하는 Drone REST API 엔드포인트예요. 이 API는 저장소에 대한 읽기 권한을 필요로 하며, 요청 파라미터 {build}는 빌드 id가 아니라 빌드 번호(build number)라는 점에 유의하세요.
출처: Drone CI Docs
본문
GET /api/repos/{owner}/{repo}/builds/{build}
응답 바디 예시:
{
"id": 100207,
"repo_id": 296163,
"number": 42,
"status": "success",
"event": "pull_request",
"action": "sync",
"link": "https://github.com/octoat/hello-world/compare/e3320539a4c0...9fc1ad6ebf12",
"message": "updated README",
"before": "e3320539a4c03ccfda992641646deb67d8bf98f3",
"after": "9fc1ad6ebf12462f3f9773003e26b4c6f54a772e",
"ref": "refs/heads/master",
"source_repo": "spaceghost/hello-world",
"source": "develop",
"target": "master",
"author_login": "octocat",
"author_name": "The Octocat",
"author_email": "octocat@github.com",
"author_avatar": "http://www.gravatar.com/avatar/7194e8d48fa1d2b689f99443b767316c",
"sender": "bradrydzewski",
"started": 1564085874,
"finished": 1564086343,
"created": 1564085874,
"updated": 1564085874,
"version": 3,
"stages": [
{
"id": 199937,
"repo_id": 296163,
"build_id": 100207,
"number": 1,
"name": "default",
"kind": "pipeline",
"type": "docker",
"status": "success",
"errignore": false,
"exit_code": 0,
"machine": "15e89c0f84f1",
"os": "linux",
"arch": "amd64",
"started": 1564085874,
"stopped": 1564086343,
"created": 1564085874,
"updated": 1564086343,
"version": 4,
"on_success": true,
"on_failure": false,
"steps": [
{
"id": 575525,
"step_id": 199937,
"number": 1,
"name": "clone",
"status": "success",
"exit_code": 0,
"started": 1564085876,
"stopped": 1564085901,
"version": 4
},
{
"id": 575526,
"step_id": 199937,
"number": 2,
"name": "test",
"status": "success",
"exit_code": 0,
"started": 1564085901,
"stopped": 1564085994,
"version": 4
}
]
}
]
}
더 알아보기 (Learn more)
- 빌드 목록 (Build List) — 저장소의 최근 빌드 목록 조회
- 빌드 로그 (Build Logs) — 스텝 로그 조회