Xcode@3 - Xcode 組建 v3 工作

使用此工作在macOS上建置 Xcode 工作區。

Syntax

# Xcode Build v3
# Build an Xcode workspace on macOS.
- task: Xcode@3
  inputs:
    actions: 'build' # string. Required. Actions. Default: build.
    #configuration: '$(Configuration)' # string. Configuration. Default: $(Configuration).
    #sdk: '$(SDK)' # string. SDK. Default: $(SDK).
    #xcWorkspacePath: '**/*.xcodeproj/*.xcworkspace' # string. Workspace/Project Path. Default: **/*.xcodeproj/*.xcworkspace.
    #scheme: # string. Scheme. 
    #packageApp: true # boolean. Create App Package. Default: true.
  # Package Options
    #archivePath: # string. Archive Path. 
    #exportPath: 'output/$(SDK)/$(Configuration)' # string. Export Path. Default: output/$(SDK)/$(Configuration).
    #exportOptions: 'auto' # 'auto' | 'plist' | 'specify'. Export Options. Default: auto.
    #exportMethod: 'development' # string. Required when exportOptions == specify. Export Method. Default: development.
    #exportTeamId: # string. Optional. Use when exportOptions == specify. Team ID. 
    #exportOptionsPlist: # string. Required when exportOptions == plist. Export Options Plist. 
    #exportArgs: # string. Export Arguments. 
  # Signing & Provisioning
    #xcode8AutomaticSigning: false # boolean. Automatic Signing. Default: false.
    #teamId: # string. Optional. Use when xcode8AutomaticSigning = true. Team ID. 
    #signMethod: 'file' # 'file' | 'id'. Override Using. Default: file.
    #iosSigningIdentity: # string. Optional. Use when signMethod = id. Signing Identity. 
    #unlockDefaultKeychain: false # boolean. Optional. Use when signMethod = id. Unlock Default Keychain. Default: false.
    #defaultKeychainPassword: # string. Optional. Use when signMethod = id. Default Keychain Password. 
    #provProfileUuid: # string. Optional. Use when signMethod = id. Provisioning Profile UUID. 
    #p12: # string. Optional. Use when signMethod = file. P12 Certificate File. 
    #p12pwd: # string. Optional. Use when signMethod = file. P12 Password. 
    #provProfile: # string. Optional. Use when signMethod = file. Provisioning Profile File. 
    #removeProfile: false # boolean. Optional. Use when signMethod = file. Remove Profile After Build. Default: false.
  # Advanced
    #args: # string. Arguments. 
    #cwd: # string. Working Directory. 
    outputPattern: 'output/$(SDK)/$(Configuration)' # string. Required. Output Directory. Default: output/$(SDK)/$(Configuration).
    #xcodeDeveloperDir: # string. Xcode Developer Path. 
    #useXcpretty: false # boolean. Use xcpretty. Default: false.
    #publishJUnitResults: false # boolean. Publish to VSTS/TFS. Default: false.

輸入

actions - 行動
string. 必要。 預設值:build

指定以空格分隔的動作清單。 有效的選項為 buildcleantestanalyzearchive。 例如: build clean 執行全新組建。 請參閱 Apple:使用 Xcode 常見問題從命令行建置


configuration - 配置
string. 預設值:$(Configuration)

指定要建置的 Xcode 專案或工作區組態。 使用變數時, (指定值,例如, Release 在 [ 變數 ] 索引標籤上) 。


sdk - Sdk
string. 預設值:$(SDK)

根據指定的 SDK 建置 Xcode 專案或工作區。 執行 xcodebuild -showsdks 以查看有效的 SDK 清單。


xcWorkspacePath - 工作區/項目路徑
string. 預設值:**/*.xcodeproj/*.xcworkspace

選擇性。 指定從存放庫根目錄到 Xcode 工作區或項目的相對路徑。 例如:MyApp/MyApp.xcworkspaceMyApp/MyApp.xcworkspace/MyApp.xcodeproj。 如果您想要在 [進階自變數] 下使用 -target flag ,請保留空白。


scheme - 方案
string.

選擇性。 指定 Xcode 設定名稱。 必須是 Xcode) 中 [受控 配置] 底下的 [共用配置 (共用配置] 複選框。 如果已指定 Workspace,則為必要專案。


packageApp - 建立應用程式套件
boolean. 預設值:true

指定是否將 IPA 產生為組建的一部分。 若要使用 Xcode 7 和 Xcode 8 匯出封存,請檢閱 套件選項 一節中的其他輸入。


archivePath - 封存路徑
string.

選擇性。 指定放置已建立封存的目錄。


exportPath - 匯出路徑
string. 預設值:output/$(SDK)/$(Configuration)

選擇性。 指定從封存匯出之產品的目的地。


exportOptions - 匯出選項
string. 允許值:autoplistspecify。 預設值:auto

指定匯出封存時傳入 匯出選項 的方法。


exportMethod - Export 方法
string. 當 exportOptions == specify 時為必要。 預設值:development

指定 Xcode 用來匯出封存的方法。 例如,app-storepackagead-hocenterprisedevelopment


exportTeamId - 小組標識碼
string. 選擇性。 使用時機 exportOptions == specify

指定要用於導出的Apple Developer Portal 10位數小組標識碼。


exportOptionsPlist - 匯出選項 Plist
string. 當 exportOptions == plist 時為必要。

指定設定封存匯出之 plist 檔案的路徑。


exportArgs - 匯出自變數
string.

指定用來導出的其他命令行自變數。


xcode8AutomaticSigning - 自動簽署
boolean. 預設值:false

如果您的 Xcode 8 或 Xcode 9 專案已設定為自動簽署,請使用此輸入。


teamId - 小組標識碼
string. 選擇性。 使用時機 xcode8AutomaticSigning = true

指定10位數的開發人員小組標識碼。 如果您是多個開發小組的成員,則需要此專案。


signMethod - 使用覆寫
string. 允許的值: file (檔案內容) , id (識別子) 。 預設值:file

如果組建使用與預設值不同的簽署或布建方法,請使用此輸入。 選擇 File Contents 使用 P12 憑證和布建配置檔。 選擇 Identifiers 從預設金鑰鏈和預安裝的設定檔擷取簽署設定。 如果您不想覆寫預設組建設定,請將對應的欄位保留空白。


iosSigningIdentity - 簽署身分識別
string. 選擇性。 使用時機 signMethod = id

指定用來簽署組建的簽署身分識別覆寫。 預設為 Xcode 項目設定。 可能需要選取 [解除鎖定預設密鑰鏈]。


unlockDefaultKeychain - 解除鎖定預設金鑰鏈
boolean. 選擇性。 使用時機 signMethod = id。 預設值:false

解除鎖定預設金鑰鏈 ,解決不允許使用者互動 的錯誤。


defaultKeychainPassword - 預設金鑰鏈密碼
string. 選擇性。 使用時機 signMethod = id

指定要解除鎖定預設金鑰鏈的密碼。


provProfileUuid - 布建配置檔 UUID
string. 選擇性。 使用時機 signMethod = id

指定要用於組建之已安裝布建配置檔的 UUID。 在 iOS、WatchKit、tvOS () 的單一工作區中,使用不同的配置或目標來指定布建配置檔。


p12 - P12 憑證檔案
string. 選擇性。 使用時機 signMethod = file

指定 PKCS12 格式化 P12 憑證檔案的相對路徑,其中包含要用於組建的簽署憑證。


p12pwd - P12 密碼
string. 選擇性。 使用 時 signMethod = file

指定 P12 憑證檔案的密碼。 使用組建變數來加密。


provProfile - 布建配置檔案
string. 選擇性。 使用 時 signMethod = file

指定要用於建置之布建配置檔覆寫的檔案相對路徑。 使用具有不同配置或目標的個別建置工作,在單一工作區中以目標指定布建配置檔, (iOS、WatchKit、tvOS) 。


removeProfile - 在建置後移除配置檔
boolean. 選擇性。 使用 時 signMethod = file。 預設值:false

在組建完成之後,從組建代理程序移除布建配置檔檔的內容。 僅檢查您是否正在每個使用者執行一個代理程式。


args - 參數
string.

指定用來建置的其他命令行自變數。 如果您想要使用 -target-project 而不是指定工作區和配置,此輸入會很有用。


cwd - 工作目錄
string.

指定組建執行的工作目錄。 預設為存放庫的根目錄。


outputPattern - 輸出目錄
string. 必要。 預設值:output/$(SDK)/$(Configuration)

指定放置建置輸出 (二進位檔) 的相對路徑。


xcodeDeveloperDir - Xcode 開發人員路徑
string.

選擇性。 如果不是系統預設值,則指定 Xcode Developer 資料夾的路徑。 用於在系統上安裝多個 Xcode 版本時使用。 例如:/Applications/Xcode 7.app/Contents/Developer


useXcpretty - 使用 xcpretty
boolean. 預設值:false

格式化 xcodebuild 輸出併產生 JUnit 測試結果報告。 必須在代理程式主機上安裝。 深入瞭解 xcpretty


publishJUnitResults - 發佈至 VSTS/TFS
boolean. 預設值:false

使用 xctool 產生的 JUnit 測試結果會發佈至 VSTS/TFS。


工作控制選項

除了工作輸入之外,所有工作都有控制選項。 如需詳細資訊,請參閱 控制選項和一般工作屬性

輸出變數

無。

規格需求

需求 描述
管線類型 YAML、傳統組建
在上執行 Agent、DeploymentGroup
要求 自我裝載代理程式必須具備符合下列需求的功能,才能執行使用此工作的作業: xcode
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任何
可設定變數 任何
代理程式版本 所有支援的代理程式版本。
工作類別 建置