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

Custom xcodebuild arguments values are not persisted

    Details

    • Similar Issues:

      Description

      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>

        Attachments

          Activity

          rking999 Richard King created issue -
          rking999 Richard King made changes -
          Field Original Value New Value
          Description 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.

          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>
          Hide
          aheritier Arnaud Héritier added a comment - - edited

          Damned I suppose your are using the new 1.3 version we just released that includes this feature ?
          I will try to provide to test it and a to fix quickly

          Show
          aheritier Arnaud Héritier added a comment - - edited Damned I suppose your are using the new 1.3 version we just released that includes this feature ? I will try to provide to test it and a to fix quickly
          Hide
          rking999 Richard King added a comment -

          Yes, I am using version 1.3 of the plugin with version 1.449 of Jenkins
          It seems like the issue isnt the persistence after all as the parameter exists in the config.xml:

          <xcodebuildArguments>SELECTED_LOCALE=${LOCALE}</xcodebuildArguments>

          Rather the form field isnt being populated when the config.xml is loaded

          Show
          rking999 Richard King added a comment - Yes, I am using version 1.3 of the plugin with version 1.449 of Jenkins It seems like the issue isnt the persistence after all as the parameter exists in the config.xml: <xcodebuildArguments>SELECTED_LOCALE=${LOCALE}</xcodebuildArguments> Rather the form field isnt being populated when the config.xml is loaded
          Hide
          aheritier 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.

          Show
          aheritier 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.
          aheritier Arnaud Héritier made changes -
          Assignee Arnaud Héritier [ aheritier ]
          Hide
          neoneye 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

          Show
          neoneye 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
          Hide
          mjamal Mohamed Jamal added a comment -

          Any workarounds?

          Show
          mjamal Mohamed Jamal added a comment - Any workarounds?
          Hide
          shades 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

          Show
          shades 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
          Hide
          aheritier 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.

          Show
          aheritier 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.
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          aheritier 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.

          Show
          aheritier 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.
          aheritier Arnaud Héritier made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          wharpreet 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.

          Show
          wharpreet 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 wharpreet made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          lacostej 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.

          Show
          lacostej 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.
          Hide
          lacostej lacostej added a comment -

          Marked as solved again as we cannot reproduce.

          Show
          lacostej lacostej added a comment - Marked as solved again as we cannot reproduce.
          lacostej lacostej made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Assignee Arnaud Héritier [ aheritier ] lacostej [ lacostej ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 142876 ] JNJira + In-Review [ 190319 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: