파이프라인 실행 이력 조회

Prev Next

Classic/VPC 환경에서 이용 가능합니다.

파이프라인 실행 이력의 상세 정보를 조회합니다.

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
GET /api/v1/project/{projectId}/history/{historyId}

요청 헤더

SourcePipeline API에서 공통으로 사용하는 헤더에 대한 정보는 SourcePipeline 요청 헤더를 참조해 주십시오.

요청 경로 파라미터

요청 경로 파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
projectId String Required 파이프라인 아이디
historyId String Required 실행 작업 결과 아이디

요청 예시

요청 예시는 다음과 같습니다.

curl --location --request GET 'https://vpcsourcepipeline.apigw.gov-ntruss.com/api/v1/project/2***/history/54***' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
result Object - 응답 결과
result.history Object - 실행 이력 정보
result.history.id Number - 실행 작업 결과 아이디
result.history.projectId Number - 파이프라인 아이디
result.history.begin Number - 실행 요청 시간
  • Unix Timestamp 형식
result.history.end Number - 실행 종료 시간
  • Unix Timestamp 형식
result.history.status String - 실행 상태
result.history.tasks Array - 작업별 이력 목록

tasks

tasks에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
id Number - 작업 아이디
name String - 작업 이름
type String - 작업 타입
  • SourceBuild | SourceDeploy
linkedTasks Array - 선행 작업 목록
status String - 작업 실행 상태
resultId String - 작업 결과 아이디
config Object - 작업 설정 정보
config.projectId Number - 작업 프로젝트 아이디
config.stageId Number - 배포 스테이지 아이디
  • typeSourceDeploy인 경우, 표시
config.scenarioId Number - 배포 시나리오 아이디
  • typeSourceDeploy인 경우, 표시
config.target Object - 연결 정보
config.target.type String - 연결 타입
  • SourceCommit | GitHub | Bitbucket | Github Enterprise Server | SourceBuild | ObjectStorage | KubernetesService
config.target.name String - 연결 프로젝트 이름
  • typeSourceBuild인 경우, 표시
config.target.info Object - 상세 연결 정보
config.target.info.repository String - 리포지토리 이름
  • typeSourceBuild인 경우, 표시
config.target.info.branch String - 브랜치 이름
  • typeSourceBuild인 경우, 표시
config.target.info.workspace Object - Bitbucket 워크스페이스 정보
  • config.target.typeBitbucket인 경우, 하위 정보 포함하여 표시
config.target.info.workspace.id String - Bitbucket 워크스페이스 아이디
config.target.info.workspace.name String - Bitbucket 워크스페이스 이름
config.target.info.authType String - Github Enterprise Server 로그인 타입
  • config.target.typeGithub Enterprise Server인 경우, 표시
config.target.info.url String - Git 리포지토리 URL
  • config.target.typeGithub Enterprise Server이고 config.target.info.authTypessh인 경우, 표시
config.target.info.serverUrl String - 서버 URL
  • config.target.typeGithub Enterprise Server이고 config.target.info.authTypeOAuth, Personal Access Token, Username/Password인 경우, 표시
config.target.info.owner String - Github Enterprise Server 소유자
  • config.target.typeGithub Enterprise Server인 경우, 표시
config.target.info.projectName String - 빌드 프로젝트 이름
  • config.target.typeSourceBuild인 경우, 표시
config.target.info.file String - Object Storage 내 파일 위치
  • config.target.typeObjectStorage인 경우, 표시
config.target.info.storageType String - 매니페스트 파일 저장소
  • config.target.typeKubernetesService인 경우, 표시
config.target.info.repository String - 매니페스트 저장 리포지토리
  • config.target.info.storageTypeSourceCommit인 경우, 표시
config.target.info.branch String - 매니페스트 저장 리포지토리의 브랜치
  • config.target.info.storageTypeSourceCommit인 경우, 표시
config.target.info.manifest String - 매니페스트 파일
  • config.target.typeKubernetesService인 경우, 표시
config.target.info.fullManifest String - 매니페스트 파일 목록
  • config.target.typeKubernetesService인 경우, 표시

응답 상태 코드

SourcePipeline API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 SourcePipeline 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

{
    "result": {
        "history": {
            "id": 54***,
            "projectId": 2***,
            "begin": 1747205286000,
            "end": 1747205302000,
            "status": "success",
            "tasks": [
                {
                    "id": 6***,
                    "name": "task1",
                    "type": "SourceBuild",
                    "linkedTasks": [],
                    "status": "success",
                    "resultId": "65f88dd0-****-****-****-7f4c5f58b640",
                    "config": {
                        "projectId": 20***,
                        "target": {
                            "type": "SourceCommit",
                            "name": "build-sample",
                            "info": {
                                "repository": "rep-sample",
                                "branch": "master"
                            }
                        }
                    }
                },
                {
                    "id": 6***,
                    "name": "task2",
                    "type": "SourceDeploy",
                    "linkedTasks": [
                        "task1"
                    ],
                    "status": "success",
                    "resultId": "80***",
                    "config": {
                        "projectId": 2***,
                        "stageId": 3***,
                        "scenarioId": 2***,
                        "target": {
                            "type": "SourceBuild",
                            "info": {
                                "projectName": "build-sample"
                            }
                        }
                    }
                }
            ]
        }
    }
}