步驟 8:檢視詳細建置資訊 - AWS CodeBuild

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

步驟 8:檢視詳細建置資訊

(上一個步驟:步驟 7:檢視摘要建置資訊)

在此步驟中,您可以在 CloudWatch 日誌中查看有關構建的詳細信息。

注意

為了保護敏感資訊,記 CodeBuild 錄檔中會隱藏下列項目:

檢視詳細建置資訊
  1. 使用您的 Web 瀏覽器前往先前步驟輸出中顯示的 deepLink 位置 (例如,https://console.aws.amazon.com/cloudwatch/home?region=region-ID#logEvent:group=/aws/codebuild/codebuild-demo-project;stream=38ca1c4a-e9ca-4dbc-bef1-d52bfEXAMPLE)。

  2. 在 CloudWatch 記錄檔資料流中,您可以瀏覽記錄事件。根據預設,只會顯示最後一組日誌事件。若要查看更早的事件,請捲動到清單的開頭。

  3. 在本教學課程中,大多數的日誌事件都包含 CodeBuild 下載及將建置依存性檔案安裝到建置環境的詳細資訊,而您可能不太重視這類資訊。您可以使用 Filter events (篩選事件) 方塊,減少顯示的資訊。例如,如果您"[INFO]"篩選事件中輸入,則只會顯示包含[INFO]的事件。如需詳細資訊,請參閱 Amazon CloudWatch 使用者指南中的篩選器和模式語法

CloudWatch 記錄檔資料流的這些部分與本教學課程有關。

... [Container] 2016/04/15 17:49:42 Entering phase PRE_BUILD [Container] 2016/04/15 17:49:42 Running command echo Entering pre_build phase... [Container] 2016/04/15 17:49:42 Entering pre_build phase... [Container] 2016/04/15 17:49:42 Phase complete: PRE_BUILD Success: true [Container] 2016/04/15 17:49:42 Entering phase BUILD [Container] 2016/04/15 17:49:42 Running command echo Entering build phase... [Container] 2016/04/15 17:49:42 Entering build phase... [Container] 2016/04/15 17:49:42 Running command mvn install [Container] 2016/04/15 17:49:44 [INFO] Scanning for projects... [Container] 2016/04/15 17:49:44 [INFO] [Container] 2016/04/15 17:49:44 [INFO] ------------------------------------------------------------------------ [Container] 2016/04/15 17:49:44 [INFO] Building Message Utility Java Sample App 1.0 [Container] 2016/04/15 17:49:44 [INFO] ------------------------------------------------------------------------ ... [Container] 2016/04/15 17:49:55 ------------------------------------------------------- [Container] 2016/04/15 17:49:55 T E S T S [Container] 2016/04/15 17:49:55 ------------------------------------------------------- [Container] 2016/04/15 17:49:55 Running TestMessageUtil [Container] 2016/04/15 17:49:55 Inside testSalutationMessage() [Container] 2016/04/15 17:49:55 Hi!Robert [Container] 2016/04/15 17:49:55 Inside testPrintMessage() [Container] 2016/04/15 17:49:55 Robert [Container] 2016/04/15 17:49:55 Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec [Container] 2016/04/15 17:49:55 [Container] 2016/04/15 17:49:55 Results : [Container] 2016/04/15 17:49:55 [Container] 2016/04/15 17:49:55 Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 ... [Container] 2016/04/15 17:49:56 [INFO] ------------------------------------------------------------------------ [Container] 2016/04/15 17:49:56 [INFO] BUILD SUCCESS [Container] 2016/04/15 17:49:56 [INFO] ------------------------------------------------------------------------ [Container] 2016/04/15 17:49:56 [INFO] Total time: 11.845 s [Container] 2016/04/15 17:49:56 [INFO] Finished at: 2016-04-15T17:49:56+00:00 [Container] 2016/04/15 17:49:56 [INFO] Final Memory: 18M/216M [Container] 2016/04/15 17:49:56 [INFO] ------------------------------------------------------------------------ [Container] 2016/04/15 17:49:56 Phase complete: BUILD Success: true [Container] 2016/04/15 17:49:56 Entering phase POST_BUILD [Container] 2016/04/15 17:49:56 Running command echo Entering post_build phase... [Container] 2016/04/15 17:49:56 Entering post_build phase... [Container] 2016/04/15 17:49:56 Phase complete: POST_BUILD Success: true [Container] 2016/04/15 17:49:57 Preparing to copy artifacts [Container] 2016/04/15 17:49:57 Assembling file list [Container] 2016/04/15 17:49:57 Expanding target/messageUtil-1.0.jar [Container] 2016/04/15 17:49:57 Found target/messageUtil-1.0.jar [Container] 2016/04/15 17:49:57 Creating zip artifact

在此範例中, CodeBuild 成功完成建置前、建置和建置後的建置階段。它執行了單位測試並成功建置了 messageUtil-1.0.jar 檔案。

下一步驟

步驟 9:取得建置輸出成品