簡體   English   中英

AWS copilot 無法創建管道

[英]AWS copilot fails to create pipeline

我的所有 docker 東西都有一個倉庫。

我也想在這里存儲 copilot 配置,而不是在每個微服務的 repo 中添加一個新的 copilot/ 目錄。 據我所知,這應該是可能的。

所以現在我在一個單獨的 repo 中有一個 copilot 目錄,如下所示:

copilot
.workspace
...
  - some-service
    - mainfest.yml
  - other-service
    - manifest.yml

等等。這行得通,我可以添加更多服務,我可以部署它們。

但是我試圖創建一個管道並且失敗了。 根據文檔,管道應該能夠處理多種服務,但我不明白如何。

我可以跑

copilot pipeline init

然后我將生成的文件推送到我的倉庫。

然后我嘗試了:

copilot pipeline update

但這會返回一個錯誤:

ACTION REQUIRED! Go to https://console.aws.amazon.com/codesuite/settings/connections to update the status of connection xy-user-service from PENDING to AVAILABLE.
✘ Failed to create a new pipeline: pipeline-myApp-user-service.
✘ create pipeline: check if changeset is empty: create change set copilot-51ef519a-711b-4126-bfbd-3d618ef824a5 for stack pipeline-myApp-user-service: ValidationError: Template format error: Unrecognized resource types: [AWS::CodeStarConnections::Connection]
    status code: 400, request id: 8a87f62a-ae14-4fe3-9a3e-8b965d2af794: describe change set copilot-51ef519a-711b-4126-bfbd-3d618ef824a5 for stack pipeline-myApp-user-service: ValidationError: Stack [pipeline-myApp-user-service] does not exist
    status code: 400, request id: 44927d7e-2514-466a-94ff-51e932042737

xy-user-service 連接不存在。 連接列表為空。 我嘗試創建它,將我的 Bitbucket 鏈接到 AWS。 但是錯誤仍然存在..

我究竟做錯了什么?

我是否應該在每個微服務的根目錄中運行copilot app init (它們位於單獨的存儲庫中),然后我應該為每個微服務創建一個單獨的管道?

不可能只將副駕駛配置存儲在一個地方嗎?

提前致謝!

聽起來您有一個包含所有配置的存儲庫,並且每個服務的源代碼都有單獨的存儲庫。

如果是這種情況,則管道無法正常工作,因為它需要 url 到源存儲庫,而不是帶有配置文件的存儲庫; 這就是它如何檢測觸發管道的源代碼更改的方式。

您可以在一個 Copilot 應用程序中擁有多個服務,但如果您想要整個應用程序的單個管道,則微服務的源代碼需要位於一個存儲庫中。

請參閱: https://aws.github.io/copilot-cli/docs/concepts/applications/

https://aws.github.io/copilot-cli/docs/concepts/services/

https://aws.github.io/copilot-cli/docs/concepts/pipelines/

(從https://github.com/aws/copilot-cli/issues/2109 交叉發布;我們主要使用 GitHub 問題進行問答。)

非常感謝!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM