본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Buildkite CLI pipeline 명령어

원문 보기 위키 갱신

bk pipeline 명령어를 사용하면 명령줄에서 파이프라인을 관리할 수 있어요. 파이프라인을 만들고, 복사하고, 목록을 보고, 변환하거나 검증하는 작업을 모두 터미널에서 처리해 봐요.

출처: 문서

본문

명령어 (Commands)

명령어 설명
bk pipeline copy 기존 파이프라인을 복사해요.
bk pipeline create 새 파이프라인을 만들어요.
bk pipeline list 파이프라인 목록을 조회해요.
bk pipeline convert CI/CD 파이프라인 설정을 Buildkite 형식으로 변환해요.
bk pipeline validate 파이프라인 YAML 파일을 검증해요.
bk pipeline view 파이프라인을 조회해요.

파이프라인 복사 (Copy pipeline)

기존 파이프라인을 복사해요.

bk pipeline copy [<pipeline>] [flags]

인자 (Arguments)

인자 설명
[<pipeline>] 복사할 원본 파이프라인이에요 (slug 또는 org/slug). 지정하지 않으면 현재 파이프라인을 사용해요.

플래그 (Flags)

플래그 설명
-o, --output="" 출력 형식이에요. json, yaml, text 중 하나를 골라요.
-t, --target=STRING 새 파이프라인의 이름이에요. 다른 조직으로 복사하려면 org/name 형식을 써요.
--cluster-name=STRING 새 파이프라인의 클러스터 이름이에요 (UUID로 변환돼요).
--cluster-uuid=STRING 새 파이프라인의 클러스터 UUID예요.
--debug REST API 호출에 대한 디버그 출력을 켜요.
--dry-run 파이프라인을 만들지 않고 무엇이 복사될지 보여줘요.
--json JSON 형식으로 출력해요.
--org=STRING 조직 slug예요.
--text 텍스트 형식으로 출력해요.
--yaml YAML 형식으로 출력해요.

예시 (Examples)

현재 파이프라인을 새 파이프라인으로 복사해요:

bk pipeline cp --target "my-pipeline-v2"

특정 파이프라인을 복사해요:

bk pipeline cp my-existing-pipeline --target "my-new-pipeline"

다른 조직의 파이프라인을 복사해요 (접근 권한이 있다면):

bk pipeline cp other-org/their-pipeline --target "my-copy"

다른 조직으로 복사해요:

bk pipeline cp my-pipeline --target "other-org/my-pipeline" --cluster-uuid "8302f0b-9b99-4663-23f3-2d64f88s693e"

클러스터 이름을 사용해 다른 조직으로 복사해요:

bk pipeline cp my-pipeline --target "other-org/my-pipeline" --cluster-name "my-cluster"

대화형 모드 — 원본과 대상을 프롬프트로 물어봐요:

bk pipeline cp

만들지 않고 복사될 내용을 미리 봐요:

bk pipeline cp my-pipeline --target "copy" --dry-run

새 파이프라인 정보를 JSON으로 출력해요:

bk pipeline cp my-pipeline -t "new-pipeline" -o json

파이프라인 생성 (Create a pipeline)

새 파이프라인을 만들어요.

bk pipeline create <name> [flags]

인자 (Arguments)

인자 설명
<name> 파이프라인의 이름이에요.

플래그 (Flags)

플래그 설명
-W, --create-webhook 파이프라인용 SCM 웹훅을 만들어요 (GitHub과 GitHub Enterprise만 지원해요).
-d, --description=STRING 파이프라인의 설명이에요.
-o, --output="" 출력 형식이에요. json, yaml, text 중 하나를 골라요.
-r, --repository=STRING 저장소 URL이에요.
--cluster-name=STRING 파이프라인에 지정할 클러스터 이름이에요 (UUID로 변환돼요).
--cluster-uuid=STRING 파이프라인에 지정할 클러스터 UUID예요.
--debug REST API 호출에 대한 디버그 출력을 켜요.
--dry-run 실제로 만들지 않고 파이프라인 생성을 시뮬레이션해요.
--json JSON 형식으로 출력해요.
--org=STRING 조직 slug예요.
--text 텍스트 형식으로 출력해요.
--yaml YAML 형식으로 출력해요.

예시 (Examples)

새 파이프라인을 만들어요:

bk pipeline create "My Pipeline" --description "My pipeline description" --repository "git@github.com:org/repo.git"

새 파이프라인을 만들고 생성된 파이프라인을 JSON 형식으로 조회해요:

bk pipeline create "My Pipeline" --description "My pipeline description" --repository "git@github.com:org/repo.git" --output json

클러스터와 함께 파이프라인을 만들어요 (UUID로):

bk pipeline create "My Pipeline" -d "Description" -r "git@github.com:org/repo.git" --cluster-uuid "cluster-uuid-123"

클러스터와 함께 파이프라인을 만들어요 (이름으로):

bk pipeline create "My Pipeline" -d "Description" -r "git@github.com:org/repo.git" --cluster-name "my-cluster"

파이프라인을 만들고 GitHub 웹훅을 설정해요:

bk pipeline create "My Pipeline" -d "Description" -r "git@github.com:org/repo.git" --create-webhook

파이프라인 생성을 시뮬레이션하고 yaml 형식으로 출력해요:

bk pipeline create "My Pipeline" -d "Description" -r "git@github.com:org/repo.git" --dry-run --output yaml

파이프라인 목록 (List pipelines)

파이프라인 목록을 조회해요.

bk pipeline list [flags]

플래그 (Flags)

플래그 설명
-l, --limit=100 반환할 최대 파이프라인 수예요 (최대 3000).
-n, --name=STRING 이름으로 파이프라인을 필터링해요 (부분 일치, 대소문자 구분 없음).
-o, --output="" 출력 형식이에요. json, yaml, text 중 하나를 골라요.
-r, --repository=STRING 저장소 URL로 파이프라인을 필터링해요 (부분 일치, 대소문자 구분 없음).
--debug REST API 호출에 대한 디버그 출력을 켜요.
--json JSON 형식으로 출력해요.
--org=STRING 조직 slug예요.
--text 텍스트 형식으로 출력해요.
--yaml YAML 형식으로 출력해요.

예시 (Examples)

모든 파이프라인을 조회해요 (기본 제한 100개):

bk pipeline list

이름 패턴과 일치하는 파이프라인을 조회해요:

bk pipeline list --name pipeline

저장소 기준으로 파이프라인을 조회해요:

bk pipeline list --repo my-repo

더 많은 파이프라인을 가져와요 (자동으로 페이지네이션돼요):

bk pipeline list --limit 500

JSON으로 출력해요:

bk pipeline list --name pipeline -o json

다른 명령과 함께 사용해요 (예: 일치하는 파이프라인의 가장 오래 걸린 빌드 가져오기):

bk pipeline list --name pipeline | xargs -I {} bk build list --pipeline {} --since 48h --duration 1h

파이프라인 변환 (Convert pipeline)

CI/CD 파이프라인 설정을 Buildkite 형식으로 변환해요.

bk pipeline convert --file=STRING [flags]

플래그 (Flags)

플래그 설명
-F, --file=STRING 변환할 파이프라인 파일의 경로예요 (필수).
-o, --output=STRING 변환된 파이프라인을 저장할 사용자 지정 경로예요 (기본: .buildkite/pipeline..yml).
-v, --vendor=STRING CI/CD 벤더예요 (파일 이름이 벤더 경로/이름과 일치하면 자동 감지 — 그렇지 않으면 지정해야 해요).
--debug REST API 호출에 대한 디버그 출력을 켜요.
--timeout=300 변환이 취소되는 시간(초)이에요.

예시 (Examples)

GitHub Actions 워크플로를 변환해요:

bk pipeline convert -F .github/workflows/ci.yml

벤더를 명시적으로 지정해 변환해요:

bk pipeline convert -F pipeline.yml --vendor circleci

출력을 파일로 저장해요:

bk pipeline convert -F .github/workflows/ci.yml -o .buildkite/pipeline.yml

stdin에서 읽어요:

cat .github/workflows/ci.yml | bk pipeline convert --vendor github
bk pipeline convert --vendor github < .github/workflows/ci.yml

파이프라인 검증 (Validate a pipeline)

파이프라인 YAML 파일을 검증해요.

bk pipeline validate [flags]

플래그 (Flags)

플래그 설명
-f, --file=FILE,... 검증할 파이프라인 YAML 파일의 경로예요.
--debug REST API 호출에 대한 디버그 출력을 켜요.

예시 (Examples)

기본 파이프라인 파일을 검증해요:

bk pipeline validate

특정 파이프라인 파일을 검증해요:

bk pipeline validate --file path/to/pipeline.yaml

여러 파이프라인 파일을 검증해요:

bk pipeline validate --file path/to/pipeline1.yaml --file path/to/pipeline2.yaml

파이프라인 조회 (View a pipeline)

파이프라인을 조회해요.

bk pipeline view [<pipeline>] [flags]

인자 (Arguments)

인자 설명
[<pipeline>] 조회할 파이프라인이에요. {pipeline slug} 또는 {org slug}/{pipeline slug} 형식일 수 있어요.

플래그 (Flags)

플래그 설명
-o, --output="" 출력 형식이에요. json, yaml, text 중 하나를 골라요.
-p, --pipeline=STRING 조회할 파이프라인이에요. {pipeline slug} 또는 {org slug}/{pipeline slug} 형식일 수 있어요.
-w, --web 파이프라인을 웹 브라우저에서 열어요.
--debug REST API 호출에 대한 디버그 출력을 켜요.
--json JSON 형식으로 출력해요.
--org=STRING 조직 slug예요.
--text 텍스트 형식으로 출력해요.
--yaml YAML 형식으로 출력해요.

예시 (Examples)

파이프라인을 조회해요:

bk pipeline view my-pipeline

플래그를 사용해 파이프라인을 조회해요:

bk pipeline view --org my-org --pipeline my-pipeline

특정 조직의 파이프라인을 조회해요:

bk pipeline view my-org/my-pipeline

브라우저에서 파이프라인을 열어요:

bk pipeline view my-pipeline --web

JSON으로 출력해요:

bk pipeline view my-pipeline -o json

더 알아보기 (Learn more)