查看回滚状态详细信息 - AWS CodePipeline

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

查看回滚状态详细信息

您可以查看回滚执行的状态和目标执行 ID。

在详情页面(控制台)上查看回滚状态

您可以使用控制台查看回滚执行的状态和目标管道执行 ID。

显示中目标管道执行 ID 字段的状态页面示例 CodePipeline。

使用 get-pipeline-execution (CLI) 查看回滚详情

已回滚的管道执行将显示在输出中,以获取管道执行。

  • 要查看管道的详细信息,请运行 get-pipeline-execution 命令,指定管道的唯一名称。例如,要查看名为的管道的详细信息 MyFirstPipeline,请输入以下内容:

    aws codepipeline get-pipeline-execution --pipeline-name MyFirstPipeline --pipeline-execution-id 3f658bd1-69e6-4448-ba3e-79007EXAMPLE

    该命令会返回管道结构。

    以下示例显示了管道中名为的部分返回的数据 MyFirstPipeline,其中显示了回滚执行 ID 和元数据。

    { "pipelineExecution": { "pipelineName": "MyFirstPipeline", "pipelineVersion": 6, "pipelineExecutionId": "2004a94e-8b46-4c34-a695-c8d20EXAMPLE", "status": "Succeeded", "artifactRevisions": [ { "name": "SourceArtifact", "revisionId": "<ID>", "revisionSummary": "Added README.txt", "revisionUrl": "<console_URL>" } ], "trigger": { "triggerType": "ManualRollback", "triggerDetail": "arn:aws:sts::<account_ID>:assumed-role/<role>" }, "executionMode": "SUPERSEDED", "executionType": "ROLLBACK", "rollbackMetadata": { "rollbackTargetPipelineExecutionId": "4f47bed9-6998-476c-a49d-e60beEXAMPLE" } } }

使用 get-pipeline-state (CLI) 查看回滚状态

已回滚的管道执行将显示在输出中,用于获取管道状态。

  • 要查看管道的详细信息,请运行 get-pipeline-state 命令,指定管道的唯一名称。例如,要查看名为的管道的状态详细信息 MyFirstPipeline,请输入以下内容:

    aws codepipeline get-pipeline-state --name MyFirstPipeline

    以下示例显示了使用回滚执行类型的返回数据。

    { "pipelineName": "MyFirstPipeline", "pipelineVersion": 7, "stageStates": [ { "stageName": "Source", "inboundExecutions": [], "inboundTransitionState": { "enabled": true }, "actionStates": [ { "actionName": "Source", "currentRevision": { "revisionId": "<Revision_ID>" }, "latestExecution": { "actionExecutionId": "13bbd05d-b439-4e35-9c7e-887cb789b126", "status": "Succeeded", "summary": "update", "lastStatusChange": "2024-04-24T20:13:45.799000+00:00", "externalExecutionId": "10cbEXAMPLEID" }, "entityUrl": "console-url", "revisionUrl": "console-url" } ], "latestExecution": { "pipelineExecutionId": "cf95a8ca-0819-4279-ae31-03978EXAMPLE", "status": "Succeeded" } }, { "stageName": "deploys3", "inboundExecutions": [], "inboundTransitionState": { "enabled": true }, "actionStates": [ { "actionName": "s3deploy", "latestExecution": { "actionExecutionId": "3bc4e3eb-75eb-45b9-8574-8599aEXAMPLE", "status": "Succeeded", "summary": "Deployment Succeeded", "lastStatusChange": "2024-04-24T20:14:07.577000+00:00", "externalExecutionId": "mybucket/SampleApp.zip" }, "entityUrl": "console-URL" } ], "latestExecution": { "pipelineExecutionId": "fdf6b2ae-1472-4b00-9a83-1624eEXAMPLE", "status": "Succeeded", "type": "ROLLBACK" } } ], "created": "2024-04-15T21:29:01.635000+00:00", "updated": "2024-04-24T20:12:24.480000+00:00" }