Build Promote
지정한 빌드 번호를 대상 환경으로 프로모트합니다 (예: 빌드 42를 프로덕션으로 프로모트). 이 API는 저장소에 대한 쓰기 권한을 필요로 한다는 점에 유의하세요.
빌드를 대상 환경으로 프로모트합니다.
출처: Drone CI Docs
본문
POST /api/repos/{owner}/{repo}/builds/{build}/promote?target={target}
커스텀 파라미터와 함께 빌드를 프로모트할 수도 있어요. 이 파라미터들은 환경변수 형태로 파이프라인 스텝에서 사용할 수 있습니다.
POST /api/repos/{owner}/{repo}/builds/{build}/promote?target={target}&{key=value}
응답 본문 예제:
{
"id": 100207,
"repo_id": 296163,
"number": 42,
"status": "pending",
"event": "promote",
"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": "master",
"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": 0,
"finished": 0,
"created": 1564085874,
"updated": 1564085874,
"version": 1,
"stages": [
{
"id": 199937,
"repo_id": 296163,
"build_id": 100207,
"number": 1,
"name": "default",
"kind": "pipeline",
"type": "docker",
"status": "pending",
"errignore": false,
"exit_code": 0,
"machine": "15e89c0f84f1",
"os": "linux",
"arch": "amd64",
"started": 0,
"stopped": 0,
"created": 1564085874,
"updated": 1564086343,
"version": 1,
"on_success": true,
"on_failure": false
}
]
}