自 2025 年 11 月 7 日起,Amazon CodeCatalyst 將不再向新客戶開放。如果您想要使用 服務,請在 2025 年 11 月 7 日之前註冊。如需詳細資訊,請參閱如何從 CodeCatalyst 遷移。
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
Devfile 事件
目前,CodeCatalyst 僅支援您 devfile 中的postStart事件。如需詳細資訊,請參閱 https://Devfile.io 文件中的 postStartObject
下列範例示範如何在 devfile 中新增postStart事件繫結。
commands:
- id: executescript
exec:
component: test
commandLine: "./projects/devfiles/script.sh"
- id: updateyum
exec:
component: test
commandLine: "yum -y update --security"
events:
postStart:
- updateyum
- executescript
啟動後,開發環境會依定義的順序執行指定的postStart命令。如果命令失敗,開發環境將繼續執行,且執行輸出會存放在 下的日誌中/aws/mde/logs。