1

I am able to trigger jenkins job whenever i commit my ios project in SVN. But my project has 4-5 configuration e.g. Debug, Release, DebugStaging, ReleaseStaging, DebugLive. So what i want to achieve is, whenever I commit in SVN, jenkins should build 4-5 jobs based on my xcode configuration.

I tried in Jenkins Item configuration under Build -> Xcode -> General Build Settings -> Configuration to write DebugStaging, but it fails my jenkins job.

Stéphane Bruckert
  • 21,706
  • 14
  • 92
  • 130
Deepak
  • 348
  • 4
  • 14

1 Answers1

1

With the Xcode plugin, you have an option to set the configuration you want to use:

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


Then you will probably want to create a multi-configuration (matrix) Project.

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

Basically in your job configuration page:

  • in Configuration Matrix, add a "User-defined axis" with name CONFIGURATION and values Debug, Release, DebugStaging, ReleaseStaging, DebugLive.

  • in Build, add a "Conditional step" (single or multiple):

    • in Run?, select "always",
    • in Builder, select your Xcode builder and set its CONFIGURATION to :

       ${ENV, var="CONFIGURATION"}
      

Your job should finally run as many times as you have configurations, that is 5 times.


Additional reading:

Community
  • 1
  • 1
Stéphane Bruckert
  • 21,706
  • 14
  • 92
  • 130
  • HI, Thanks alot, your answer seems relevant but i am still confused, what do you mean by "in Build, add a "Conditional step" (single or multiple)" i dont know how to do this. – Deepak Dec 10 '14 at 10:27
  • 1
    I upvoted your answer bcoz its really useful, but still i am stuck in the way i want. I will try ur solution also. Thanks alot – Deepak Dec 10 '14 at 10:36
  • I am talking about "parts" of your job configuration page. It is divided into categories, such as "Advanced Project Options", "Build Triggers", "Configuration Matrix", etc. and this where you can add actions. – Stéphane Bruckert Dec 10 '14 at 10:43