I could not find any document for macOS cloud runner build setup, There is no guide on how we can set up or import iOS distribution certificate or profile to cloud runner. I have followed some of GitHub guides and that seems not to work for GitLab.
Here is what I tried so far.
# create temporary keychain - security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security set-keychain-settings -lu -t 216000 $KEYCHAIN_PATH - security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH # import certificate to keychain - security import Certificate_Profiles/Distribution_Certificate_Chr0next.p12 -P $IOS_P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH # apply provisioning profile - mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles - cp Certificate_Profiles/AppStore.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles
Archive failed error message, it works fine if I run on my local GitLab runner.
** ARCHIVE FAILED ** 2432The following build commands failed: 2433 PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/gitlab/Library/Developer/Xcode/DerivedData/Chronext-fppnnvwqhitkbmevauzvohgmkssm/Build/Intermediates.noindex/ArchiveIntermediates/Chronext/IntermediateBuildFilesPath/Chronext.build/Release-iphoneos/Chronext.build/Script-6F0EE1FE5DBAEDF37214B4D7.sh
Still, the archive fails and it seems the keychain is an issue. I am not sure even if Gitlab has any kind of documentation for the same, I tried and couldn’t find anything.
Anyone knows or has any idea please feel free to share.