xcodebuild: error: 'file' is not a workspace file

Posted by Vladimir Voitekhovski on Stack Overflow See other posts from Stack Overflow or by Vladimir Voitekhovski
Published on 2014-05-30T09:19:18Z Indexed on 2014/05/30 9:25 UTC
Read the original article Hit count: 636

Filed under:
|
|
|

there were no problem but now my job in Jenkins CI failed. I try to rename Xcode workspace like RacingPost.xcworkspace no changes. Try to delete this options at all, this job also failed.

Configuration:

XCODEPROJECTDIRECTORY=.
TARGET_BUILD_DIR=${XCODEPROJECTDIRECTORY}/build
XCODEWORKSPACE=RacingPost.xcodeproj
XCODESCHEME=UnitTests
XCODECONFIGURATION=ENTERPRISE-HD
XCODESDK=iphoneos
XCODEARGS="TEST_AFTER_BUILD=YES"
XCODEBUILD_APP_NAME=RacingPost.app
XCODETARGET=UnitTests
XCODEPROJECT=RacingPost.xcodeproj
IPA_PATH=${TARGET_BUILD_DIR}/RacingPost.ipa

xcrun -sdk iphoneos PackageApplication -v "$(${XCTOOL_HOME}/xctool.sh -scheme RacingPost -project   ${XCODEPROJECT} -configuration "${XCODECONFIGURATION}" -sdk  "${XCODESDK}" -showBuildSettings -workspace   ${WORKSPACE}| grep TARGET_BUILD_DIR | cut -d = -f 2 | cut -d . -f 1 | head -1 | sed 's/^[ ^t]*//')/${XCODEBUILD_APP_NAME}" -o "${IPA_PATH}"

Output:

17:33:25 ** BUILD SUCCEEDED ** (58104 ms)
 17:33:27 [RGP-ODC_RacingPost_iPad_staging] $ /bin/bash -xe /var/folders/df/575wx61n4dzdlw_48pgsjwk40000gn/T/hudson6052564280091633098.sh
17:33:27 + cd .
17:33:27 ++ /Users/epadmin/ci-tools/xctool/xctool.sh -scheme RacingPost -project RacingPost.xcodeproj - configuration ENTERPRISE-HD -sdk iphoneos -showBuildSettings -workspace /Users/epadmin/jenkins-slave/workspace/RGP- ODC_RacingPost_iPad_staging
17:33:27 ++ grep TARGET_BUILD_DIR
17:33:27 ++ cut -d = -f 2
17:33:27 ++ cut -d . -f 1
17:33:27 ++ head -1
17:33:27 ++ sed 's/^[ ^t]*//'
17:33:30 xcodebuild: error: '/Users/epadmin/jenkins-slave/workspace/RGP-ODC_RacingPost_iPad_staging' is not a workspace file.
17:33:30 + xcrun -sdk iphoneos PackageApplication -v /RacingPost.app -o ./build/RacingPost.ipa
17:33:30 error: Specified application doesn't exist or isn't a bundle directory : '/RacingPost.app'
17:33:30 Build step 'Execute shell' marked build as failure

My structure of folders on node:

epadmin@epclus1macp02:~/jenkins-slave/workspace/RGP-ODC_RacingPost_iPad_staging$ ls

drwxr-xr-x  21 epadmin  staff   714B May 29 10:28 ./
drwxr-xr-x  37 epadmin  staff   1.2K May 29 10:33 ../
drwxr-xr-x   7 epadmin  staff   238B May 29 10:28 .svn/
drwxr-xr-x  10 epadmin  staff   340B Apr 18 09:02 RacingPost/
drwxr-xr-x  10 epadmin  staff   340B May 29 09:27 RacingPost.xcodeproj/
drwxr-xr-x  10 epadmin  staff   340B May  7 09:04 RacingPostUtilApp/
drwxr-xr-x   3 epadmin  staff   102B May 18 02:16 Source/
drwxr-xr-x  75 epadmin  staff   2.5K Apr 16 09:03 UnitTests/
drwxr-xr-x  16 epadmin  staff   544B May 29 09:05 _certs/
drwxr-xr-x   3 epadmin  staff   102B Apr 15 09:03 _doc/
drwxr-xr-x   4 epadmin  staff   136B Apr 15 09:03 _provisioning/
drwxr-xr-x   3 epadmin  staff   102B May 29 10:31 build/
-rw-r--r--   1 epadmin  staff   9.9K May 19 04:39 build.xml

© Stack Overflow or respective owner

Related posts about xcode

Related posts about jenkins