기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
스테이지 선언
파이프라인의 스테이지 수준에는 다음 파라미터와 구문이 포함된 기본 구조가 있습니다. 자세한 내용은 CodePipeline API 가이드의 StageDeclaration 객체를 참조하세요.
다음 예제는 JSON 및 YAML 모두에서 파이프라인 구조의 스테이지 수준을 보여줍니다. 이 예제는 Source
및 Build
라는 두 스테이지를 보여줍니다. 이 예제에는 두 가지 조건이 포함되어 있습니다. 하나는 onSuccess
용이고 다른 하나는 beforeEntry
용입니다.
- YAML
-
pipeline:
name: MyPipeline
roleArn: >-
arn:aws:iam::ACCOUNT_ID
:role/service-role/AWSCodePipelineServiceRole-us-west-2-MyPipeline
artifactStore:
type: S3
location: amzn-s3-demo-bucket
stages:
- name: Source
actions:
- name: Source
...
- name: Build
actions:
- name: Build
...
onSuccess:
conditions:
- result: ROLLBACK
rules:
- name: DeploymentWindowRule
...
beforeEntry:
conditions:
- result: FAIL
rules:
- name: MyLambdaRule
...
version: 6
metadata:
pipelineArn: 'arn:aws:codepipeline:us-west-2:ACCOUNT_ID
:MyPipeline'
created: '2019-12-12T06:49:02.733000+00:00'
updated: '2020-09-10T06:34:07.447000+00:00'
- JSON
-
{
"pipeline": {
"name": "MyPipeline",
"roleArn": "arn:aws:iam::ACCOUNT_ID
:role/service-role/AWSCodePipelineServiceRole-us-west-2-MyPipeline",
"artifactStore": {
"type": "S3",
"location": "amzn-s3-demo-bucket"
},
"stages": [
{
"name": "Source",
"actions": [
{
"name": "Source",
...
}
]
},
{
"name": "Build",
"actions": [
{
"name": "Build",
...
}
],
"onSuccess": {
"conditions": [
{
"result": "ROLLBACK",
"rules": [
{
"name": "DeploymentWindowRule",
...
}
]
}
]
},
"beforeEntry": {
"conditions": [
{
"result": "FAIL",
"rules": [
{
"name": "MyLambdaRule",
...
}
]
}
]
}
}
],
}
],
"version": 6
},
"metadata": {
"pipelineArn": "arn:aws:codepipeline:us-west-2:ACCOUNT_ID
:MyPipeline",
"created": "2019-12-12T06:49:02.733000+00:00",
"updated": "2020-09-10T06:34:07.447000+00:00"
}
}
name
단계의 이름입니다.
actions
파이프라인의 작업 수준에는 다음 파라미터와 구문이 포함된 기본 구조가 있습니다. 파라미터와 예제를 보려면 작업 선언 섹션을 참조하세요.
conditions
조건에는 CodePipeline의 규칙 목록에서 사용할 수 있는 하나 이상의 규칙이 포함됩니다. 조건의 모든 규칙이 성공하면 조건이 충족됩니다. 기준이 충족되지 않으면 지정된 결과가 적용되도록 조건을 구성할 수 있습니다.
다음과 같은 유형의 조건을 구성할 수 있습니다.
-
beforeEntry
-
onFailure
-
onSuccess
자세한 정보와 지침은 스테이지에 대한 조건 구성 섹션을 참조하세요.
rules
각 조건에는 함께 평가되는 규칙의 순서 집합인 규칙 집합이 있습니다. 따라서 조건에서 하나의 규칙이 실패하면 조건이 실패합니다. 파이프라인 런타임 시 규칙 조건을 재정의할 수 있습니다.
사용 가능한 규칙은 규칙 참조에 나와 있습니다. 자세한 내용은 규칙 구조 참조의 규칙 구조 참조를 참조하세요.