Langsung ke konten

Opsi Konfigurasi

Referensi lengkap untuk setiap opsi konfigurasi Cloud Build. Gunakan halaman ini untuk menemukan flag CLI, variabel lingkungan, atau kunci kredensial untuk pengaturan build apa pun.

Setiap opsi build dapat diatur dengan berbagai cara. Jika opsi yang sama diatur di beberapa tempat, sumber dengan prioritas lebih tinggi yang berlaku:

Contoh: Jika kredensial tersimpan Anda memiliki SKIP_BUILD_NUMBER_BUMP=true tetapi Anda meneruskan --no-skip-build-number-bump pada CLI, flag CLI yang berlaku dan nomor build akan bertambah otomatis.


Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--build-certificate-base64 <cert>BUILD_CERTIFICATE_BASE64BUILD_CERTIFICATE_BASE64—Base64-encoded .p12 sertifikat distribusi
--ios-provisioning-profile <map>CAPGO_IOS_PROVISIONING_MAPCAPGO_IOS_PROVISIONING_MAP—Provisioning profile sebagai path atau bundleId=path mapping. Dapat diulang untuk aplikasi multi-target (app + ekstensi); nama profile diekstrak secara otomatis.
--p12-password <password>P12_PASSWORDP12_PASSWORD—Kata sandi untuk .p12 sertifikat (abaikan jika sertifikat tidak memiliki kata sandi)
Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--apple-key-id <id>APPLE_KEY_IDAPPLE_KEY_ID—ID Kunci App Store Connect API
--apple-issuer-id <id>APPLE_ISSUER_IDAPPLE_ISSUER_ID—App Store Connect Issuer ID (UUID)
--apple-key-content <content>APPLE_KEY_CONTENTAPPLE_KEY_CONTENT—Kunci API App Store Connect yang di-encode Base64 (.p8 file)
--app-store-connect-team-id <id>APP_STORE_CONNECT_TEAM_IDAPP_STORE_CONNECT_TEAM_ID—Team ID App Store Connect
Bagian berjudul “Autentikasi app-specific password (tidak disarankan)”
Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--apple-id <email>FASTLANE_USERFASTLANE_USER—Email Apple ID dari akun pemilik aplikasi
--apple-app-specific-password <password>FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORDFASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD—Kata sandi khusus aplikasi (xxxx-xxxx-xxxx-xxxx) yang dibuat di appleid.apple.com
--apple-app-id <id>APPLE_APP_IDAPPLE_APP_ID—ID aplikasi App Store Connect numerik (misal. 1234567890)
Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--ios-scheme <scheme>CAPGO_IOS_SCHEMECAPGO_IOS_SCHEMEAppXcode scheme untuk build
--ios-target <target>CAPGO_IOS_TARGETCAPGO_IOS_TARGETAppTarget Xcode untuk membaca build settings
--ios-distribution <mode>CAPGO_IOS_DISTRIBUTIONCAPGO_IOS_DISTRIBUTIONapp_storeMode distribusi: app_store atau ad_hoc
--xcode-version <version>CAPGO_IOS_XCODE_VERSIONCAPGO_IOS_XCODE_VERSIONapa sajaBuild dengan versi Xcode ini, misalnya 26, 26.0.1 atau 27Versi mayor mencakup semua versi minor. Build akan langsung gagal dan menampilkan daftar versi yang tersedia jika tidak ada yang cocok.

Build dengan Xcode 27 (iOS 27 SDK) dengan --xcode-version 27:

Jendela terminal
npx @capgo/cli@latest build request --platform ios --xcode-version 27

Aplikasi yang di-build dengan iOS 27 SDK harus menggunakan UIScene lifecycle: tanpa UIApplicationSceneManifest di Info.plist dan scene delegate, iOS 27 akan menghentikan aplikasi saat launch. Capgo memblokir build ini sebelum dimulai (pemeriksaan prescan ios/plist-scene-lifecycle-xcode27). Tambahkan SceneDelegate dan UIApplicationSceneManifest ke ios/App/App/Info.plist, atau lanjut build dengan --xcode-version 26 sampai Anda melakukannya. Lihat panduan scene lifecycle dari Apple.

Capgo Build akan menghentikan proses build proyek iOS yang menggunakan CocoaPods pada Desember 2026. Migrasikan proyek Anda ke Swift Package Manager sebelum itu: lihat panduan Capacitor SPM. Sampai saat itu, build CocoaPods tetap berjalan; CLI menampilkan peringatan dan Capgo mengirim email pengingat ke admin organisasi Anda.


Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--android-keystore-file <keystore>ANDROID_KEYSTORE_FILEANDROID_KEYSTORE_FILE—File keystore yang di-encode Base64 (.keystore atau .jks)
--keystore-key-alias <alias>KEYSTORE_KEY_ALIASKEYSTORE_KEY_ALIASkey0Alias key keystore
--keystore-key-password <password>KEYSTORE_KEY_PASSWORDKEYSTORE_KEY_PASSWORD—Password key keystore (memakai password store jika tidak diisi)
--keystore-store-password <password>KEYSTORE_STORE_PASSWORDKEYSTORE_STORE_PASSWORD—Password store keystore
Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--play-config-json <json>PLAY_CONFIG_JSONPLAY_CONFIG_JSON—Kunci JSON service account Google Play yang di-encode Base64
--android-track <track>PLAY_STORE_TRACKPLAY_STORE_TRACKinternal (atau production dengan --submit-to-store-review)Release track Google Play (internal, alpha, beta, production). Diteruskan dari env CI / CLI ke build runner.
--android-release-status <status>PLAY_STORE_RELEASE_STATUSPLAY_STORE_RELEASE_STATUSdraft (atau completed dengan --submit-to-store-review)Status release pada track yang dipilih (draft, completed, inProgress, halted). Nilai eksplisit menimpa --submit-to-store-review default.
Flag CLIDefaultDeskripsi
--android-flavor <flavor>—Product flavor yang akan di-build (mis. production). Wajib jika proyek Anda mendefinisikan beberapa flavor.
--android-track <track>internalGoogle Play track untuk upload ini. Dengan --submit-to-store-review dan track tidak diatur, Capgo default ke production.
--android-release-status <status>draftStatus rilis Google Play. Dengan --submit-to-store-review dan status tidak diatur, Capgo default ke completed.
--in-app-update-priority <0–5>—Prioritas in-app update Google Play untuk rilis ini (lebih tinggi = lebih mendesak).
--no-playstore-upload—Build dan sign, tapi lewati upload ke Play Store (membutuhkan --output-upload).

Opsi ini berlaku untuk build iOS dan Android.

Flag CLIDefaultDeskripsi
--platform <platform>—Wajib diisi. ios atau android
--build-mode <mode>releasedebug atau release
--path <path>.Direktori proyek
--verbosefalseAktifkan log build detail
--ai-analyticsfalseSaat build gagal, kirim logs ke Capgo AI untuk diagnosis — lihat Diagnosis Build AI
Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--skip-build-number-bumpSKIP_BUILD_NUMBER_BUMPSKIP_BUILD_NUMBER_BUMPfalseLewati peningkatan otomatis build number / version code
--no-skip-build-number-bump———Aktifkan kembali auto-increment secara eksplisit (mengabaikan kredensial tersimpan)

Secara default, Capgo Cloud Build secara otomatis meningkatkan nomor build:

  • iOS: Mengambil nomor build terbaru dari App Store Connect, lalu menambahkannya 1
  • Android: Mengambil maks versionCode dari Google Play, lalu menambahkannya 1

Saat --skip-build-number-bump diset, build akan menggunakan versi yang sudah ada di file proyek Anda (proyek Xcode atau build.gradle).

Flag CLIVariabel EnvKey KredensialDefaultDeskripsi
--output-uploadBUILD_OUTPUT_UPLOAD_ENABLEDBUILD_OUTPUT_UPLOAD_ENABLEDfalseUnggah hasil build (IPA/APK/AAB) ke penyimpanan Capgo. Jika diatur via env var, gunakan BUILD_OUTPUT_UPLOAD_ENABLED=true.
--no-output-uploadBUILD_OUTPUT_UPLOAD_ENABLED——Nonaktifkan pengunggahan output. Jika diatur via env var, gunakan BUILD_OUTPUT_UPLOAD_ENABLED=false.
--output-retention <duration>BUILD_OUTPUT_RETENTION_SECONDSBUILD_OUTPUT_RETENTION_SECONDS1hBerapa lama link download tetap aktif
--output-record <path>———Setelah build berhasil, tulis rekaman JSON (job ID, status, URL download, QR code) ke <path> — baca kembali dengan build last-output.

Format retensi: Gunakan durasi yang mudah dibaca seperti 1h, 6h, 2d, 7d. Minimum 1 jam, maksimum 7 hari. Jika diatur via env var, gunakan detik (mis., 3600 selama 1 jam).

Capgo menyimpan artefak native hasil kompilasi (CocoaPods, Gradle, dan output build terkait) per aplikasi sehingga build berulang dimulai lebih cepat. Build cache diaktifkan secara default untuk setiap aplikasi.

Flag CLIfield APIDefaultDeskripsi
--no-cachecache_enabled: falsecache aktifNonaktifkan cache untuk build ini: lewati restore dan jangan simpan entri baru
--cache-key <value>cache_key(hilangkan)Partisi cache (misalnya prod, staging). Hilangkan untuk satu cache umum bersama per aplikasi

padanan CLI: build request menerima --no-cache dan --cache-key.

Contoh CLI:

Jendela terminal
# Default: restore/save the shared per-app cache
bunx @capgo/cli@latest build request com.example.app --platform android
# Separate caches per environment
bunx @capgo/cli@latest build request com.example.app --platform android \
--cache-key=prod
bunx @capgo/cli@latest build request com.example.app --platform android \
--cache-key=staging \
--android-flavor staging
# One-off clean build (no restore, no save)
bunx @capgo/cli@latest build request com.example.app --platform ios --no-cache

API / payload webhook (saat integrasi Anda memanggil Capgo Build secara langsung):

{
"platform": "android",
"cache_key": "prod"
}

Hilangkan cache_key untuk cache general bersama. Atur cache_key untuk partisi berdasarkan environment. Atur "cache_enabled": false untuk menonaktifkan cache pada satu request (sama dengan --no-cache).

Jika build terlihat sukses tapi artifact-nya salah — atau Android AAB hilang setelah beralih RC vs production — coba dedicated cache key atau one-off --no-cache build. Lihat Troubleshooting: restore cache yang salah.

Flag CLIVariabel EnvDefaultDeskripsi
-a, --apikey <key>CAPGO_TOKEN—Kunci Capgo API untuk autentikasi
--supa-host <host>——Host Supabase kustom (hanya self-hosting)
--supa-anon <key>——Anon key Supabase kustom (hanya self-hosting)

Siap salin-tempel untuk pipeline CI/CD Anda. Semua variabel bersifat opsional — hanya atur yang Anda butuhkan.

Jendela terminal
# Code signing (required for iOS builds)
BUILD_CERTIFICATE_BASE64="<base64-encoded .p12>"
CAPGO_IOS_PROVISIONING_MAP="<provisioning map generated by the CLI>"
P12_PASSWORD="<certificate password>"
# App Store Connect (required for store submission)
APPLE_KEY_ID="ABC1234567"
APPLE_ISSUER_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
APPLE_KEY_CONTENT="<base64-encoded .p8 key>"
APP_STORE_CONNECT_TEAM_ID="TEAM123456"
# Alternative to the App Store Connect API key above: Apple ID + app-specific
# password (e.g. when migrating from Ionic Appflow). All three are required.
# FASTLANE_USER="apple-id@example.com"
# FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD="xxxx-xxxx-xxxx-xxxx"
# APPLE_APP_ID="1234567890"
# Optional iOS settings
CAPGO_IOS_SCHEME="App"
CAPGO_IOS_TARGET="App"
CAPGO_IOS_XCODE_VERSION="27"
Jendela terminal
# Keystore signing (required for Android builds)
ANDROID_KEYSTORE_FILE="<base64-encoded .keystore>"
KEYSTORE_KEY_ALIAS="my-key-alias"
KEYSTORE_KEY_PASSWORD="<key password>"
KEYSTORE_STORE_PASSWORD="<store password>"
# Google Play (required for store submission)
PLAY_CONFIG_JSON="<base64-encoded service account JSON>"
# Optional Android settings
PLAY_STORE_TRACK="internal"
PLAY_STORE_RELEASE_STATUS="draft"
Jendela terminal
# Build behavior
SKIP_BUILD_NUMBER_BUMP="true" # Skip auto-increment
BUILD_OUTPUT_UPLOAD_ENABLED="true" # Upload IPA/APK/AAB
BUILD_OUTPUT_RETENTION_SECONDS="3600" # 1 hour download link
# Authentication
CAPGO_TOKEN="your-api-key"

Daripada meneruskan flags atau env vars setiap kali, simpan credentials sekali:

Jendela terminal
# Save iOS credentials
bunx @capgo/cli@latest build credentials save \
--platform ios \
--certificate ./dist_cert.p12 \
--ios-provisioning-profile ./profile.mobileprovision \
--p12-password "cert-password" \
--apple-key ./AuthKey.p8 \
--apple-key-id ABC1234567 \
--apple-issuer-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
--apple-team-id TEAM123456
# Save Android credentials
bunx @capgo/cli@latest build credentials save \
--platform android \
--keystore ./release.keystore \
--keystore-alias my-key \
--keystore-key-password "key-pass" \
--keystore-store-password "store-pass" \
--play-config ./play-service-account.json
FlagLokasiKasus Penggunaan
(default)~/.capgo-credentials/credentials.jsonGlobal — dipakai bersama semua proyek di mesin Anda
--local.capgo-credentials.json di root proyekPer-proyek — menimpa global jika keduanya ada

Kredensial dikelompokkan berdasarkan app ID (mis. com.example.myapp), sehingga satu file kredensial bisa menyimpan pengaturan untuk beberapa app tanpa konflik. Kredensial tiap app juga dipisahkan berdasarkan platform (ios / android).

Jendela terminal
# List saved credentials
bunx @capgo/cli@latest build credentials list
# Update a specific option without re-entering everything
bunx @capgo/cli@latest build credentials update --skip-build-number-bump
# Clear saved credentials
bunx @capgo/cli@latest build credentials clear --platform ios

name: Build and Submit
on:
push:
branches: [main]
jobs:
build-ios:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bunx cap sync ios
- run: bunx @capgo/cli@latest build request --platform ios
env:
CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }}
BUILD_CERTIFICATE_BASE64: ${{ secrets.IOS_CERTIFICATE }}
CAPGO_IOS_PROVISIONING_MAP: ${{ secrets.CAPGO_IOS_PROVISIONING_MAP }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
APP_STORE_CONNECT_TEAM_ID: ${{ secrets.APP_STORE_CONNECT_TEAM_ID }}
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bunx cap sync android
- run: bunx @capgo/cli@latest build request --platform android
env:
CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }}
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG_JSON }}
Jendela terminal
# Build iOS with all options inline
bunx @capgo/cli@latest build request \
--platform ios \
--build-mode release \
--skip-build-number-bump \
--output-retention 6h \
--apikey YOUR_API_KEY
# Build Android, skip version bump, no output upload
bunx @capgo/cli@latest build request \
--platform android \
--skip-build-number-bump \
--no-output-upload \
--apikey YOUR_API_KEY

Gabungkan kredensial tersimpan dengan override CLI:

Jendela terminal
# Save base credentials once
bunx @capgo/cli@latest build credentials save --platform ios \
--certificate ./cert.p12 \
--ios-provisioning-profile ./profile.mobileprovision \
--output-upload
# Override specific options per-build
bunx @capgo/cli@latest build request --platform ios \
--skip-build-number-bump \
--output-retention 2d

Kredensial tersimpan menyediakan detail penandatanganan, sementara flag CLI menimpa perilaku build untuk run spesifik ini.