All Products
Search
Document Center

CloudOps Orchestration Service:Hasilkan URL repositori Git: ACS::GitCodeRepo

Last Updated:Jun 23, 2026

Penggunaan

Menghasilkan URL untuk kode dalam repositori GitHub atau Gitee tertentu.

Sintaks

Tasks:
  - Name: GitCodeRepo
    Action: ACS::GitCodeRepo
    Description: Menentukan sumber kode dan menghasilkan tautan otorisasi temporary.
    Properties:
      Platform: github # Wajib diisi. Platformnya. Nilai yang valid: github, gitee.
      Owner: your-github-user-name # Wajib diisi. Nama akun GitHub.
      Organization: your-github-organization # Opsional. Nama organisasi.
      Repository: your-github-repository # Wajib diisi. Nama repositori.
    Outputs:
      authorizedUrl: # URL kode dalam repositori GitHub atau Gitee yang ditentukan.
        Type: String
        ValueSelector: AuthorizedUrl # Sintaks selector jq. Nilai kembali task digunakan sebagai input JSON. Untuk informasi lebih lanjut tentang sintaks jq, lihat https://stedolan.github.io/jq.

Catatan

  • Anda harus memberikan otorisasi terlebih dahulu sebelum menggunakan fitur ini. Saat membuat templat atau menjalankan task, ikuti prompt untuk menyelesaikan otorisasi.

  • Output berupa URL, contohnya:

https://your_***@github.com/owner/repo

Gunakan URL ini untuk melakukan clone kode. Contohnya:

git clone https://your_***@github.com/owner/repo .

Contoh

FormatVersion: OOS-2019-06-01
Parameters:
  instanceId:
    Description: ID instans yang akan Anda jalankan.
    Type: String
Tasks:
  - Name: GitCodeRepo
    Action: ACS::GitCodeRepo
    Description: Menentukan sumber kode dan menghasilkan tautan otorisasi temporary.
    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
      zh-cn: Execute the clone code command
    Properties:
      instanceId: '{{ instanceId }}'
      commandType: RunShellScript
      commandContent: |-
        git clone '{{ GitCodeRepo.authorizedUrl }}' .