Jenkins and Xcode 8: Failed to copy PNG files

Getting this error since trying to use Xcode 8 with Jenkins. This has never happened before, and Xcode 8 on one computer compiled just fine, so we only get it in Jenkins. Does anyone know why? We use the Xcode integration plugin v1.4.11 for iOS build jobs.

This is the error message in the Jenkins log:

15:04:16 ** BUILD FAILED **
15:04:16 
15:04:16 
15:04:16 The following build commands failed:
15:04:16    CopyPNGFile /Users/Shared/Jenkins/Home/jobs/Project_iOS_Build_Release_Branch/workspace/builds/dev_staging/SomeAssets.bundle/icon_cart.png SomewPod/Something/Assets/icon_cart.png

I found out that this seems to be happening for all the assets in the pod asset package, no matter which one. For some reason, when compiling with Jenkins, pod assets are not copied to a temporary location in the Jenkins workspace.

Any Jenkins / Xcode experts who know about this? This problem seriously affects our construction pipeline.

EDIT: I found out that this command does not work in Jenkins at first:

/Applications/Xcode.app/Contents/Developer/usr/bin/copypng -compress -strip-PNG-text /Users/Shared/Jenkins/Home/jobs/iOS_Test/workspace/Pods/FooPod/Foo/Assets/foo.png /Users/Shared/Jenkins/Home/jobs/iOS_Test/workspace/builds/dev_staging/FooAssets.bundle/foo.png

but when I run it in the terminal, it successfully executes and copies the file. Why is it suddenly not with Jenkins?

EDIT2:

I came across this line in the output of Jenkins log:

execvP: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin: path too long

There seems to be a problem with Jenkins with long path names. This explains why this problem only occurs with Jenkins and not with Xcode.

Since I cannot reduce the length of the path character, I wonder if there are any known ways to work around this Jenkins problem?

+4
source share

Source: https://habr.com/ru/post/1657442/


All Articles