Xcode@3 - Xcode 生成 v3 任务
使用此任务可以在 macOS 上生成 Xcode 工作区。
语法
# 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
。
指定以空格分隔的操作列表。 有效选项为 build
、clean
、test
、analyze
和 archive
。 例如: 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.xcworkspace
或 MyApp/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
. 允许的值:auto
、plist
、specify
。 默认值:auto
。
指定在导出存档时传入 导出选项 的方法。
exportMethod
-
Export 方法
string
. 当 exportOptions == specify
时,需要此选项。 默认值:development
。
指定 Xcode 用于导出存档的方法。 例如,app-store
、package
、ad-hoc
、enterprise
或 development
。
exportTeamId
-
团队 ID
string
. 可选。 在 时 exportOptions == specify
使用 。
指定用于导出的 Apple 开发人员门户 10 位团队 ID。
exportOptionsPlist
-
导出选项列表
string
. 当 exportOptions == plist
时,需要此选项。
指定配置存档导出的 plist 文件的路径。
exportArgs
-
导出参数
string
.
指定用于导出的其他命令行参数。
xcode8AutomaticSigning
-
自动签名
boolean
. 默认值:false
。
如果为自动签名配置了 Xcode 8 或 Xcode 9 项目,请使用此输入。
teamId
-
团队 ID
string
. 可选。 在 时 xcode8AutomaticSigning = true
使用 。
指定 10 位开发人员团队 ID。 如果你是多个开发团队的成员,则此参数是必需的。
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。
任务控制选项
除了任务输入,所有任务都有控制选项。 有关详细信息,请参阅 控制选项和常见任务属性。
输出变量
无。