Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12510

Custom xcodebuild arguments values are not persisted

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • xcode-plugin
    • None

      If I add a custom xcode config parameter such as SELECTED_LOCALE=en and click save, the custom parameter is not persisted. When I edit the project config again the parameter isnt there.

      My config.xml file has the following entry for the XCode plugin:

      <builders>
      <au.com.rayh.XCodeBuilder>
      <cleanBeforeBuild>true</cleanBeforeBuild>
      <cleanTestReports>false</cleanTestReports>
      <configuration>In-House</configuration>
      <target>NTC</target>
      <sdk></sdk>
      <symRoot></symRoot>
      <configurationBuildDir>${WORKSPACE}/build/In-House-iphoneos</configurationBuildDir>
      <xcodeProjectPath></xcodeProjectPath>
      <xcodeProjectFile></xcodeProjectFile>
      <xcodebuildArguments>SELECTED_LOCALE=${LOCALE}</xcodebuildArguments>
      <xcodeSchema>In-House</xcodeSchema>
      <xcodeWorkspaceFile></xcodeWorkspaceFile>
      <embeddedProfileFile></embeddedProfileFile>
      <cfBundleVersionValue>2.6</cfBundleVersionValue>
      <cfBundleShortVersionStringValue>2.6</cfBundleShortVersionStringValue>
      <buildIpa>true</buildIpa>
      <unlockKeychain>false</unlockKeychain>
      <keychainPath>${HOME}/Library/Keychains/login.keychain</keychainPath>
      <keychainPwd></keychainPwd>
      </au.com.rayh.XCodeBuilder>
      </builders>

          [JENKINS-12510] Custom xcodebuild arguments values are not persisted

          ok, I think I know where it is coming from.
          I will try to provide the bug fix this week.

          Arnaud Héritier added a comment - ok, I think I know where it is coming from. I will try to provide the bug fix this week.

          Since I upgraded to Xcode 4.3, I had to use "Custom xcodebuild arguments" with the value "TEST_AFTER_BUILD=YES". Otherwise the unittests wouldn't run. The value works the first time a job is run. The following jobs it has been forgotten somehow.

          Xcode 4.3
          Jenkins 1.452
          XCode integration 1.3
          OS X 10.7.3

          Simon Strandgaard added a comment - Since I upgraded to Xcode 4.3, I had to use "Custom xcodebuild arguments" with the value "TEST_AFTER_BUILD=YES". Otherwise the unittests wouldn't run. The value works the first time a job is run. The following jobs it has been forgotten somehow. Xcode 4.3 Jenkins 1.452 XCode integration 1.3 OS X 10.7.3

          Mohamed Jamal added a comment -

          Any workarounds?

          Mohamed Jamal added a comment - Any workarounds?

          Erik Lindberg added a comment -

          I think it will be fixed like this:

          diff --git a/src/main/java/au/com/rayh/XCodeBuilder.java b/src/main/java/au/com/rayh/XCodeBuilder.java
          index f7d10e2..cbf4c13 100644
          — a/src/main/java/au/com/rayh/XCodeBuilder.java
          +++ b/src/main/java/au/com/rayh/XCodeBuilder.java
          @@ -92,7 +92,7 @@ public class XCodeBuilder extends Builder {
          /**

          • @since 1.3
            */
          • private String xcodebuildArguments;
            + public final String xcodebuildArguments;
            /**
          • @since 1.2
            */

          Basically, change private String xcodebuildArguments to public final String xcodebuildArguments

          Erik Lindberg added a comment - I think it will be fixed like this: diff --git a/src/main/java/au/com/rayh/XCodeBuilder.java b/src/main/java/au/com/rayh/XCodeBuilder.java index f7d10e2..cbf4c13 100644 — a/src/main/java/au/com/rayh/XCodeBuilder.java +++ b/src/main/java/au/com/rayh/XCodeBuilder.java @@ -92,7 +92,7 @@ public class XCodeBuilder extends Builder { /** @since 1.3 */ private String xcodebuildArguments; + public final String xcodebuildArguments; /** @since 1.2 */ Basically, change private String xcodebuildArguments to public final String xcodebuildArguments

          I'm sorry for this bug, I'm overwhelmed these days.
          I will push a bugfix release in few minutes.

          Arnaud Héritier added a comment - I'm sorry for this bug, I'm overwhelmed these days. I will push a bugfix release in few minutes.

          Code changed in jenkins
          User: Arnaud Héritier
          Path:
          src/main/java/au/com/rayh/XCodeBuilder.java
          http://jenkins-ci.org/commit/xcode-plugin/45f6c393ee14e2c44525c4e792bc96f8eca8ff4d
          Log:
          JENKINS-12510 : Custom xcodebuild arguments values are not persisted

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Arnaud Héritier Path: src/main/java/au/com/rayh/XCodeBuilder.java http://jenkins-ci.org/commit/xcode-plugin/45f6c393ee14e2c44525c4e792bc96f8eca8ff4d Log: JENKINS-12510 : Custom xcodebuild arguments values are not persisted

          A version 1.3.1 will be available in the update center.
          Sorry for the long delay to fix a stupid bug like this.
          Take care that there is another bug on this field (JENKINS-12800) that doesn't allow it to use spaces in parameter values even if you escape it. I don't have the time to investigate and find a fix for now.

          Arnaud Héritier added a comment - A version 1.3.1 will be available in the update center. Sorry for the long delay to fix a stupid bug like this. Take care that there is another bug on this field ( JENKINS-12800 ) that doesn't allow it to use spaces in parameter values even if you escape it. I don't have the time to investigate and find a fix for now.

          wharpreet added a comment -

          Still facing this issue with 1.4.1
          And checked the master branch in github, the changed made for 1.3.1 are still present.

          wharpreet added a comment - Still facing this issue with 1.4.1 And checked the master branch in github, the changed made for 1.3.1 are still present.

          lacostej added a comment -

          I tested locally with a recent jenkins (Jenkins ver. 1.565.1)

          and a new project with xcode builder.

          The field appears in the config when saved.

          <xcodebuildArguments>SELECTED_LOCALE=en</xcodebuildArguments>
          <xcodeSchema></xcodeSchema>
          <xcodeWorkspaceFile></xcodeWorkspaceFile>

          I am using ce1992dc36a1322de363fb16eafa3e5f23af9779 (1.4.3-alpha) version of the plugin and I don't see changes that could affect this.

          I am going to close this issue. If you face the issue again, let us know and we will investigate this further.

          lacostej added a comment - I tested locally with a recent jenkins (Jenkins ver. 1.565.1) and a new project with xcode builder. The field appears in the config when saved. <xcodebuildArguments>SELECTED_LOCALE=en</xcodebuildArguments> <xcodeSchema></xcodeSchema> <xcodeWorkspaceFile></xcodeWorkspaceFile> I am using ce1992dc36a1322de363fb16eafa3e5f23af9779 (1.4.3-alpha) version of the plugin and I don't see changes that could affect this. I am going to close this issue. If you face the issue again, let us know and we will investigate this further.

          lacostej added a comment -

          Marked as solved again as we cannot reproduce.

          lacostej added a comment - Marked as solved again as we cannot reproduce.

            lacostej lacostej
            rking999 Richard King
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: