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

Can't add xcodebuild parameters including whitespace

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xcode-plugin
    • Labels:
      None
    • Similar Issues:
      Show 5 results

      Description

      I am trying to pass the parameter 'CODE_SIGN_IDENTITY="iPhone Distribution"' to xcodebuild via the new 'custom xcodebuild arguments' field. But no matter how I quote this it always gets split into two paramters at the whitespace which makes the build fail.

        Attachments

          Activity

          Hide
          iamtony Tony Le added a comment -

          I'm experiencing the same issue. I've also tried escaping in a variety of ways and all of them seem to fail.

          CODE_SIGN_IDENTITY=iPhone\ Distribution:\ MangoDango,\ Inc
          CODE_SIGN_IDENTITY="iPhone Distribution: MangoDango, Inc"
          CODE_SIGN_IDENTITY="iPhone\ Distribution:\ MangoDango,\ Inc"
          CODE_SIGN_IDENTITY='iPhone Distribution: MangoDango, Inc'
          CODE_SIGN_IDENTITY=\"iPhone Distribution: MangoDango, Inc\"
          CODE_SIGN_IDENTITY=iPhone\ Distribution\:\ MangoDango\,\ Inc

          There doesn't seem to be any other way in the xcode plugin to specify code signing identities. It allows you to specify a provisioning profile, but not the code sign identity for the underlying xcrun command. Furthermore, there is a bug with that area as well. See JENKINS-14028.

          Any other suggestions than the ones mentioned above?

          Show
          iamtony Tony Le added a comment - I'm experiencing the same issue. I've also tried escaping in a variety of ways and all of them seem to fail. CODE_SIGN_IDENTITY=iPhone\ Distribution:\ MangoDango,\ Inc CODE_SIGN_IDENTITY="iPhone Distribution: MangoDango, Inc" CODE_SIGN_IDENTITY="iPhone\ Distribution:\ MangoDango,\ Inc" CODE_SIGN_IDENTITY='iPhone Distribution: MangoDango, Inc' CODE_SIGN_IDENTITY=\"iPhone Distribution: MangoDango, Inc\" CODE_SIGN_IDENTITY=iPhone\ Distribution\:\ MangoDango\,\ Inc There doesn't seem to be any other way in the xcode plugin to specify code signing identities. It allows you to specify a provisioning profile, but not the code sign identity for the underlying xcrun command. Furthermore, there is a bug with that area as well. See JENKINS-14028 . Any other suggestions than the ones mentioned above?
          Hide
          atlas1015 Raymond Gonzales added a comment -

          I found a great workaround for building with jenkins.

          Firstly, before setting up a job, download a jenkins plugin called:

          Parameterized Trigger Plugin

          https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin

          Once you do that, create your job and while creating the job, select the

          'This build is parameterized' checkbox

          Create a String Parameter. I called mine CODE_SIGN_IDENTITY.

          So the name field in the String Parameter should be:

          --------------

          Name: CODE_SIGN_IDENTITY

          Default Value: iPhone Developer: XXX XXXXX

          Description: Whatever you want to put there

          --------------

          Then in your Xcode Plugin, find the 'Custom xcodebuild arguments' field.

          In the Custom xcodebuild arguments field, place the following value:

          CODE_SIGN_IDENTITY=$

          {CODE_SIGN_IDENTITY}

          Finish setting up your job and you should be all set!

          This will bypass the white space issue. The plugin is a life saver as it works wonderfully and you can customize your build with other parameters.

          Show
          atlas1015 Raymond Gonzales added a comment - I found a great workaround for building with jenkins. Firstly, before setting up a job, download a jenkins plugin called: Parameterized Trigger Plugin https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin Once you do that, create your job and while creating the job, select the 'This build is parameterized' checkbox Create a String Parameter. I called mine CODE_SIGN_IDENTITY. So the name field in the String Parameter should be: -------------- Name: CODE_SIGN_IDENTITY Default Value: iPhone Developer: XXX XXXXX Description: Whatever you want to put there -------------- Then in your Xcode Plugin, find the 'Custom xcodebuild arguments' field. In the Custom xcodebuild arguments field, place the following value: CODE_SIGN_IDENTITY=$ {CODE_SIGN_IDENTITY} Finish setting up your job and you should be all set! This will bypass the white space issue. The plugin is a life saver as it works wonderfully and you can customize your build with other parameters.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Victor Barros
          Path:
          src/main/java/au/com/rayh/XCodeBuilder.java
          src/test/java/au/com/rayh/XCodeBuilderTest.java
          http://jenkins-ci.org/commit/xcode-plugin/8b0e0525b9583fbfd90cebe56882a0bd0b5abf5b
          Log:
          fix for issue JENKINS-12800
          https://issues.jenkins-ci.org/browse/JENKINS-12800

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Victor Barros Path: src/main/java/au/com/rayh/XCodeBuilder.java src/test/java/au/com/rayh/XCodeBuilderTest.java http://jenkins-ci.org/commit/xcode-plugin/8b0e0525b9583fbfd90cebe56882a0bd0b5abf5b Log: fix for issue JENKINS-12800 https://issues.jenkins-ci.org/browse/JENKINS-12800
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jerome Lacoste
          Path:
          pom.xml
          src/main/java/au/com/rayh/XCodeBuilder.java
          src/test/java/au/com/rayh/XCodeBuilderTest.java
          http://jenkins-ci.org/commit/xcode-plugin/d08553a852c2feb61ec016bb0940a3571b613a9d
          Log:
          Merge pull request #22 from heyzooi/master

          fix for issue JENKINS-12800

          Compare: https://github.com/jenkinsci/xcode-plugin/compare/17322cab642c...d08553a852c2

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jerome Lacoste Path: pom.xml src/main/java/au/com/rayh/XCodeBuilder.java src/test/java/au/com/rayh/XCodeBuilderTest.java http://jenkins-ci.org/commit/xcode-plugin/d08553a852c2feb61ec016bb0940a3571b613a9d Log: Merge pull request #22 from heyzooi/master fix for issue JENKINS-12800 Compare: https://github.com/jenkinsci/xcode-plugin/compare/17322cab642c...d08553a852c2
          Hide
          lacostej lacostej added a comment -

          I suspect this was fixed back in 2013.

          Show
          lacostej lacostej added a comment - I suspect this was fixed back in 2013.

            People

            • Assignee:
              Unassigned
              Reporter:
              sweidauer Sven Weidauer
            • Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: