檢視還原狀態詳細資 - 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" }