We have been using our build setup for few years now. However we are getting an error in out iOS build only when it run through Jenkins for few days now.
Out setup is as below.
- CICD – Jenkin Jobs
- Jenkins node- running on an iMac x86_64(Mac OS Ventura 13.6, Xcode- 15.1, iPhone SDK 17.2)
- Agent connection – SSH
- Build script – Using Fastlane (latest version 2.2.0)
There was no recent changes done to the Jenkins node or the connection mechanism recently.
When we execute the Jenkins job it errors out during Archiving stage indicating following error
ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution [CP] Embed Pods Frameworks /Users/myjenkinsuser/Library/Developer/Xcode/DerivedData/PoPoc-ghliacqvmeaczodimbswpjdefbrk/Build/Intermediates.noindex/ArchiveIntermediates/PoPoc/IntermediateBuildFilesPath/PoPoc.build/Release-iphoneos/PoPoc.build/Script-9B3D469C72BEFC2B2114A431.sh (in target ‘PoPoc’ from project ‘PoPoc’)
(1 failure)
[23:16:36]: [31mExit status: 65[0m
The interesting thing is when we run the same build commands from the Jenkins node via a terminal the build succeeds. Also when build through Xcode (within the Jenkins node) it completes without any errors.
Following was attempted:
- Clearing the workspace before running the Jenkins job
- Clearing out the Derived data folder
- Pod deintegrate and POD install
At the moment we execute the fastlane script from within the Jenkins Node to create builds but this is not ideal as the access to the node has been granted only to a limited number of people.
Glad if anyone can point us in the direction to investigate this as we are running out of ideas.