開發檔命令 - Amazon CodeCatalyst

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

開發檔命令

目前, CodeCatalyst 僅支持您的 devfile 中的exec命令。如需詳細資訊,請參閱 DevFile.io 文件中的新增命令

下列範例說明如何在 devfile 中指定exec命令。

commands: - id: setupscript exec: component: test commandLine: "chmod +x script.sh" workingDir: /projects/devfiles - id: executescript exec: component: test commandLine: "./projects/devfiles/script.sh" - id: updateyum exec: component: test commandLine: "yum -y update --security"

連線到開發環境之後,您可以透過終端機執行已定義的命令。

/aws/mde/mde command <command-id> /aws/mde/mde command executescript

對於長時間運行的命令,您可以使用 Streaming 標誌-s來實時輸出命令的執行。

/aws/mde/mde -s command <command-id>
注意

command-id必須是小寫。

支援的執行參數 CodeCatalyst

CodeCatalyst 在開發文件版本 2.0.0 上支持以下exec參數。

  • commandLine

  • component

  • id

  • workingDir