I am trying to set up a remote Bamboo agent as a CI for my iOS development. I am using Fastlane to run tests, create builds etc.
The problem I am having is that in Fastlane I want to clear and reinstall all of my pod files. There is a built in action to fastlane that handles both of these tasks: clean_cocoapods_cache and cocoapods.
When I run my lane with the these actions I get an error in Bamboo:
You cannot run CocoaPods as root. (CLAide::Help)
When I run the lane locally this error does not occur. However if I run the lane locally with sudo permissions I do in fact get the same error.
So it appears that Bamboo jobs are all run as root user by default when doing so through a remote agent. Is there any way I can change/control this so that the job runs without this level of access?
Instead of doing this cocoapod operation in Fastlane I then tried to run this as a script directly in the Bamboo job using this code:
rm -rf ~/Library/Caches/CocoaPods; rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*; pod deintegrate; pod setup; pod install;
however this gave the same error as before.
I have scoured the internet but apparently not many others have this problem, which is surprising as I would have thought iOS development would be popular on Bamboo and most projects are using CocoaPods.