すべてのプロダクト
Search
ドキュメントセンター

CloudOps Orchestration Service:Git リポジトリ URL の生成: ACS::GitCodeRepo

最終更新日:Jun 23, 2026

使用方法

指定された GitHub または Gitee リポジトリにあるコードの URL を生成します。

構文

Tasks:
  - Name: GitCodeRepo
    Action: ACS::GitCodeRepo
    Description: コードソースを指定し、一時的な認可リンクを生成します。
    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 # jq セレクター構文。タスクの戻り値が JSON 入力として使用されます。jq 構文の詳細については、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: コードソースを指定し、一時的な認可リンクを生成します。
    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:
      en: Execute clone code command
      ja: クローンコードコマンドを実行します
      zh-cn: Execute the clone code command
    Properties:
      instanceId: '{{ instanceId }}'
      commandType: RunShellScript
      commandContent: |-
        git clone '{{ GitCodeRepo.authorizedUrl }}' .