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

CONFIGURATION_BUILD_DIR custom value is partly ignored for Archive action

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • xcode-plugin
    • None
    • cocoapods 0.35.0
      xcode Version 6.1.1 (6A2008a)
      os x 10.10.1
      jenkins-ci xcode-plugin 1.4.8
      jenkins v1.600

      Have a project, that builds an iOS app and has dependencies managed via CocoaPods; have some pod included, that contains resources (e.g. pod 'AWSiOSSDKv2' - this pod includes additions .json files, that must be embedded inside the .app bundle)

      The CocoaPods creates additional post-build step in Xcode setup to copy pods resources into the app bundle
      This step actually runs a generated shell script, which is located at

      {SRCROOT}

      /Pods/Target Support Files/Pods-

      {target-name}/Pods-{target-name}

      -resources.sh
      the script is using $CONFIGURATION_BUILD_DIR env. var to define the destination folder for resources copying

      Now create a job at Jenkins, that will do the following:

      • call 'pod install' for the project (this will download pods, generate copying script, create project workspace)
      • add Xcode plugin as build step, setup it to create an Archive and override CONFIGURATION_BUILD_DIR

      When you run a job, the copy resources script will reference CONFIGURATION_BUILD_DIR to the value of the build dir, setup earlier
      However, .app, that will be archived is located in DerivedData directory

      As result, the script copies resources to the wrong path; the archive generated doesn't contain required resources (the app will probably crash during run-time)

      If you update the Xcode build step not to override CONFIGURATION_BUILD_DIR, everything works like expected; CONFIGURATION_BUILD_DIR in the copy-resources script references to the correct location in the DerivedData dir

          [JENKINS-27196] CONFIGURATION_BUILD_DIR custom value is partly ignored for Archive action

          Gurusharan S added a comment -

          We should probably override BUILD_DIR rather than CONFIGURATION_BUILD_DIR. This might do the trick.

          Gurusharan S added a comment - We should probably override BUILD_DIR rather than CONFIGURATION_BUILD_DIR. This might do the trick.

            Unassigned Unassigned
            asidden Denis Syrokvash
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: