説明
ユーザー指定の GitHub または Gitee コードリポジトリの URL を生成します。
構文
Tasks:
- Name: GitCodeRepo
Action: ACS::GitCodeRepo
Description: 指定されたコードリポジトリの一時的な承認済み URL を生成する
Properties:
Platform: github # 必須。プラットフォーム。有効な値: github および gitee。
Owner: your-github-user-name # 必須。GitHub アカウントの名前。
Organization: your-github-organization # オプション。組織の名前。
Repository: your-github-repository # 必須。リポジトリの名前。
Outputs:
authorizedUrl: # 指定された GitHub または Gitee コードリポジトリの URL。
Type: String
ValueSelector: AuthorizedUrl # タスクに対して返された JSON データから必要な情報を選択するための jQuery セレクター。jQuery セレクターの構文の詳細については、https://stedolan.github.io/jq を参照してください。使用上の注意
この操作を使用するには、承認が必要です。テンプレートまたは実行を作成する場合は、リマインダーに注意し、プロンプトに従って承認を完了してください。
出力は URL です。例:
https://your_***@github.com/owner/repoこの URL を使用してコードをプルできます。例:
git clone https://your_***@github.com/owner/repo .例
FormatVersion: OOS-2019-06-01
Parameters:
instanceId:
Description: 起動するインスタンス ID。
Type: String
Tasks:
- Name: GitCodeRepo
Action: ACS::GitCodeRepo
Description: 指定されたコードリポジトリの一時的な承認済み URL を生成する
Properties:
Platform: github
Owner: your-github-user-name
Organization: your-github-organization
Repository: your-github-repository
Outputs:
authorizedUrl:
Type: String
ValueSelector: AuthorizedUrl
- Name: CloneCode
Action: ACS::ECS::RunCommand
Description: コードクローンコマンドを実行する
Properties:
instanceId: '{{ instanceId }}'
commandType: RunShellScript
commandContent: |-
git clone '{{ GitCodeRepo.authorizedUrl }}' .