gpt4 book ai didi

ios - Jenkins CI : How to trigger jenkins jobs based on different Xcode project configurations

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:19:05 25 4
gpt4 key购买 nike

每当我在 SVN 中提交我的 ios 项目时,我都能够触发 jenkins 作业。但是我的项目有 4-5 个配置,例如调试、发布、DebugStaging、ReleaseStaging、DebugLive。所以我想要实现的是,每当我在 SVN 中提交时,jenkins 应该根据我的 xcode 配置构建 4-5 个作业。

我尝试在 Build -> Xcode -> General Build Settings -> Configuration 下的 Jenkins Item 配置中编写 DebugStaging,但我的 jenkins 工作失败了。

最佳答案

随着Xcode plugin ,您可以选择设置要使用的配置:

configuration: This is the name of the configuration as defined in the Xcode project. By default there are Debug and Release configurations.


然后您可能想要创建一个多配置(矩阵)项目。

The Configuration Matrix allows you to specify what steps to duplicate, and create a multiple-axis graph of the type of builds to create.

基本上在您的作业配置页面中:

  • Configuration Matrix 中,添加名称为 CONFIGURATION 的“用户定义轴”和值(value)观 Debug, Release, DebugStaging, ReleaseStaging, DebugLive .

  • Build 中,添加“条件步骤”(单个或多个):

    • Run? 中,选择“always”,
    • Builder 中,选择您的 Xcode 构建器并设置其 CONFIGURATION到:

       ${ENV, var="CONFIGURATION"}

您的作业最终应该运行与您的配置一样多的次数,即 5 次。


补充阅读:

关于ios - Jenkins CI : How to trigger jenkins jobs based on different Xcode project configurations,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27397291/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com