Skip to content

Commit 311e9e0

Browse files
author
AWS
committed
AWS CodePipeline Update: Add ability to manually and automatically roll back a pipeline stage to a previously successful execution.
1 parent 9628b06 commit 311e9e0

File tree

2 files changed

+160
-1
lines changed

2 files changed

+160
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS CodePipeline",
4+
"contributor": "",
5+
"description": "Add ability to manually and automatically roll back a pipeline stage to a previously successful execution."
6+
}

services/codepipeline/src/main/resources/codegen-resources/service-2.json

Lines changed: 154 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"endpointPrefix":"codepipeline",
66
"jsonVersion":"1.1",
77
"protocol":"json",
8+
"protocols":["json"],
89
"serviceAbbreviation":"CodePipeline",
910
"serviceFullName":"AWS CodePipeline",
1011
"serviceId":"CodePipeline",
@@ -515,6 +516,25 @@
515516
],
516517
"documentation":"<p>You can retry a stage that has failed without having to run a pipeline again from the beginning. You do this by either retrying the failed actions in a stage or by retrying all actions in the stage starting from the first action in the stage. When you retry the failed actions in a stage, all actions that are still in progress continue working, and failed actions are triggered again. When you retry a failed stage from the first action in the stage, the stage cannot have any actions in progress. Before a stage can be retried, it must either have all actions failed or some actions failed and some succeeded.</p>"
517518
},
519+
"RollbackStage":{
520+
"name":"RollbackStage",
521+
"http":{
522+
"method":"POST",
523+
"requestUri":"/"
524+
},
525+
"input":{"shape":"RollbackStageInput"},
526+
"output":{"shape":"RollbackStageOutput"},
527+
"errors":[
528+
{"shape":"ValidationException"},
529+
{"shape":"ConflictException"},
530+
{"shape":"PipelineNotFoundException"},
531+
{"shape":"PipelineExecutionNotFoundException"},
532+
{"shape":"PipelineExecutionOutdatedException"},
533+
{"shape":"StageNotFoundException"},
534+
{"shape":"UnableToRollbackStageException"}
535+
],
536+
"documentation":"<p>Rolls back a stage execution.</p>"
537+
},
518538
"StartPipelineExecution":{
519539
"name":"StartPipelineExecution",
520540
"http":{
@@ -2079,6 +2099,13 @@
20792099
},
20802100
"documentation":"<p>The interaction or event that started a pipeline execution.</p>"
20812101
},
2102+
"ExecutionType":{
2103+
"type":"string",
2104+
"enum":[
2105+
"STANDARD",
2106+
"ROLLBACK"
2107+
]
2108+
},
20822109
"ExecutorConfiguration":{
20832110
"type":"structure",
20842111
"members":{
@@ -2102,6 +2129,16 @@
21022129
},
21032130
"ExternalExecutionId":{"type":"string"},
21042131
"ExternalExecutionSummary":{"type":"string"},
2132+
"FailureConditions":{
2133+
"type":"structure",
2134+
"members":{
2135+
"result":{
2136+
"shape":"Result",
2137+
"documentation":"<p>The specified result for when the failure conditions are met, such as rolling back the stage.</p>"
2138+
}
2139+
},
2140+
"documentation":"<p>The configuration that specifies the result, such as rollback, to occur upon stage failure. </p>"
2141+
},
21052142
"FailureDetails":{
21062143
"type":"structure",
21072144
"required":[
@@ -2841,6 +2878,10 @@
28412878
"shape":"MaxResults",
28422879
"documentation":"<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.</p>"
28432880
},
2881+
"filter":{
2882+
"shape":"PipelineExecutionFilter",
2883+
"documentation":"<p>The pipeline execution to filter on.</p>"
2884+
},
28442885
"nextToken":{
28452886
"shape":"NextToken",
28462887
"documentation":"<p>The token that was returned from the previous <code>ListPipelineExecutions</code> call, which can be used to return the next set of pipeline executions in the list.</p>"
@@ -3200,10 +3241,28 @@
32003241
"executionMode":{
32013242
"shape":"ExecutionMode",
32023243
"documentation":"<p>The method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED.</p>"
3244+
},
3245+
"executionType":{
3246+
"shape":"ExecutionType",
3247+
"documentation":"<p>The type of the pipeline execution.</p>"
3248+
},
3249+
"rollbackMetadata":{
3250+
"shape":"PipelineRollbackMetadata",
3251+
"documentation":"<p>The metadata about the execution pertaining to stage rollback.</p>"
32033252
}
32043253
},
32053254
"documentation":"<p>Represents information about an execution of a pipeline.</p>"
32063255
},
3256+
"PipelineExecutionFilter":{
3257+
"type":"structure",
3258+
"members":{
3259+
"succeededInStage":{
3260+
"shape":"SucceededInStageFilter",
3261+
"documentation":"<p>Filter for pipeline executions where the stage was successful in the current pipeline version.</p>"
3262+
}
3263+
},
3264+
"documentation":"<p>The pipeline execution to filter on.</p>"
3265+
},
32073266
"PipelineExecutionId":{
32083267
"type":"string",
32093268
"pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
@@ -3223,6 +3282,14 @@
32233282
"documentation":"<p>Unable to stop the pipeline execution. The execution might already be in a <code>Stopped</code> state, or it might no longer be in progress.</p>",
32243283
"exception":true
32253284
},
3285+
"PipelineExecutionOutdatedException":{
3286+
"type":"structure",
3287+
"members":{
3288+
"message":{"shape":"Message"}
3289+
},
3290+
"documentation":"<p>The specified pipeline execution is outdated and cannot be used as a target pipeline execution for rollback.</p>",
3291+
"exception":true
3292+
},
32263293
"PipelineExecutionStatus":{
32273294
"type":"string",
32283295
"enum":[
@@ -3247,6 +3314,10 @@
32473314
"shape":"PipelineExecutionStatus",
32483315
"documentation":"<p>The status of the pipeline execution.</p> <ul> <li> <p>InProgress: The pipeline execution is currently running.</p> </li> <li> <p>Stopped: The pipeline execution was manually stopped. For more information, see <a href=\"https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped\">Stopped Executions</a>.</p> </li> <li> <p>Stopping: The pipeline execution received a request to be manually stopped. Depending on the selected stop mode, the execution is either completing or abandoning in-progress actions. For more information, see <a href=\"https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-executions-stopped\">Stopped Executions</a>.</p> </li> <li> <p>Succeeded: The pipeline execution was completed successfully. </p> </li> <li> <p>Superseded: While this pipeline execution was waiting for the next stage to be completed, a newer pipeline execution advanced and continued through the pipeline instead. For more information, see <a href=\"https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-superseded\">Superseded Executions</a>.</p> </li> <li> <p>Failed: The pipeline execution was not completed successfully.</p> </li> </ul>"
32493316
},
3317+
"statusSummary":{
3318+
"shape":"PipelineExecutionStatusSummary",
3319+
"documentation":"<p>Status summary for the pipeline.</p>"
3320+
},
32503321
"startTime":{
32513322
"shape":"Timestamp",
32523323
"documentation":"<p>The date and time when the pipeline execution began, in timestamp format.</p>"
@@ -3270,6 +3341,14 @@
32703341
"executionMode":{
32713342
"shape":"ExecutionMode",
32723343
"documentation":"<p>The method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED.</p>"
3344+
},
3345+
"executionType":{
3346+
"shape":"ExecutionType",
3347+
"documentation":"<p>Type of the pipeline execution.</p>"
3348+
},
3349+
"rollbackMetadata":{
3350+
"shape":"PipelineRollbackMetadata",
3351+
"documentation":"<p>The metadata for the stage execution to be rolled back.</p>"
32733352
}
32743353
},
32753354
"documentation":"<p>Summary information about a pipeline execution.</p>"
@@ -3324,6 +3403,16 @@
33243403
"documentation":"<p>The pipeline was specified in an invalid format or cannot be found.</p>",
33253404
"exception":true
33263405
},
3406+
"PipelineRollbackMetadata":{
3407+
"type":"structure",
3408+
"members":{
3409+
"rollbackTargetPipelineExecutionId":{
3410+
"shape":"PipelineExecutionId",
3411+
"documentation":"<p>The pipeline execution ID to which the stage will be rolled back.</p>"
3412+
}
3413+
},
3414+
"documentation":"<p>The metadata for the stage execution to be rolled back.</p>"
3415+
},
33273416
"PipelineStageDeclarationList":{
33283417
"type":"list",
33293418
"member":{"shape":"StageDeclaration"}
@@ -3814,6 +3903,10 @@
38143903
"documentation":"<p>The resource was specified in an invalid format.</p>",
38153904
"exception":true
38163905
},
3906+
"Result":{
3907+
"type":"string",
3908+
"enum":["ROLLBACK"]
3909+
},
38173910
"RetryStageExecutionInput":{
38183911
"type":"structure",
38193912
"required":[
@@ -3872,6 +3965,38 @@
38723965
"max":1024,
38733966
"pattern":"arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/.*"
38743967
},
3968+
"RollbackStageInput":{
3969+
"type":"structure",
3970+
"required":[
3971+
"pipelineName",
3972+
"stageName",
3973+
"targetPipelineExecutionId"
3974+
],
3975+
"members":{
3976+
"pipelineName":{
3977+
"shape":"PipelineName",
3978+
"documentation":"<p>The name of the pipeline for which the stage will be rolled back. </p>"
3979+
},
3980+
"stageName":{
3981+
"shape":"StageName",
3982+
"documentation":"<p>The name of the stage in the pipeline to be rolled back. </p>"
3983+
},
3984+
"targetPipelineExecutionId":{
3985+
"shape":"PipelineExecutionId",
3986+
"documentation":"<p>The pipeline execution ID for the stage to be rolled back to. </p>"
3987+
}
3988+
}
3989+
},
3990+
"RollbackStageOutput":{
3991+
"type":"structure",
3992+
"required":["pipelineExecutionId"],
3993+
"members":{
3994+
"pipelineExecutionId":{
3995+
"shape":"PipelineExecutionId",
3996+
"documentation":"<p>The execution ID of the pipeline execution for the stage that has been rolled back.</p>"
3997+
}
3998+
}
3999+
},
38754000
"S3ArtifactLocation":{
38764001
"type":"structure",
38774002
"required":[
@@ -4029,6 +4154,10 @@
40294154
"actions":{
40304155
"shape":"StageActionDeclarationList",
40314156
"documentation":"<p>The actions included in a stage.</p>"
4157+
},
4158+
"onFailure":{
4159+
"shape":"FailureConditions",
4160+
"documentation":"<p>The method to use when a stage has not completed successfully. For example, configuring this field for rollback will roll back a failed stage automatically to the last successful pipeline execution in the stage.</p>"
40324161
}
40334162
},
40344163
"documentation":"<p>Represents information about a stage and its definition.</p>"
@@ -4047,6 +4176,10 @@
40474176
"status":{
40484177
"shape":"StageExecutionStatus",
40494178
"documentation":"<p>The status of the stage, or for a completed stage, the last status of the stage.</p> <note> <p>A status of cancelled means that the pipeline’s definition was updated before the stage execution could be completed.</p> </note>"
4179+
},
4180+
"type":{
4181+
"shape":"ExecutionType",
4182+
"documentation":"<p>The type of pipeline execution for the stage, such as a rollback pipeline execution.</p>"
40504183
}
40514184
},
40524185
"documentation":"<p>Represents information about the run of a stage.</p>"
@@ -4221,6 +4354,16 @@
42214354
"max":200
42224355
},
42234356
"String":{"type":"string"},
4357+
"SucceededInStageFilter":{
4358+
"type":"structure",
4359+
"members":{
4360+
"stageName":{
4361+
"shape":"StageName",
4362+
"documentation":"<p>The name of the stage for filtering for pipeline executions where the stage was successful in the current pipeline version.</p>"
4363+
}
4364+
},
4365+
"documentation":"<p>Filter for pipeline executions that have successfully completed the stage in the current pipeline version.</p>"
4366+
},
42244367
"Tag":{
42254368
"type":"structure",
42264369
"required":[
@@ -4404,9 +4547,19 @@
44044547
"Webhook",
44054548
"CloudWatchEvent",
44064549
"PutActionRevision",
4407-
"WebhookV2"
4550+
"WebhookV2",
4551+
"ManualRollback",
4552+
"AutomatedRollback"
44084553
]
44094554
},
4555+
"UnableToRollbackStageException":{
4556+
"type":"structure",
4557+
"members":{
4558+
"message":{"shape":"String"}
4559+
},
4560+
"documentation":"<p>Unable to roll back the stage. The cause might be if the pipeline version has changed since the target pipeline execution was deployed, the stage is currently running, or an incorrect target pipeline execution ID was provided.</p>",
4561+
"exception":true
4562+
},
44104563
"UntagResourceInput":{
44114564
"type":"structure",
44124565
"required":[

0 commit comments

Comments
 (0)