简体   繁体   中英

Fastlane Scan's build process misses a CocoaPod framework on Jenkins CI

We're using Fastlane in our app to run tests on a Jenkins CI environment. The test lane was working well until a few days ago when all of a sudden, most of our test runs began failing due to the build process skipping the Firebase pod, which then causes every class in the project which touches Firebase to fail to compile. As far as we can tell, nothing changed with the project file around that time and the test lane still works flawlessly on our local environments.

Of note: it seems like clearing the Cocoapod cache on the CI server temporarily resolves the issue, but it quickly returns. I'd rather not make this a part of the build process, as downloading the Cocoapods repo is very time consuming and would use up a huge amount of bandwidth if we were doing it on every CI run.

Does anyone have any idea what could cause the Fastlane invocation of xcodebuild to behave differently on a Jenkins server than locally?

Well, we found a solution in two parts:

  1. We limited the build box to only processing a single CI request at a time. It had been running up to 2 simultaneously, which we suspect could cause problems with cocoapods as well as leading to a higher incidence of timeout failures in our test suite.
  2. We deleted the Jenkins workspace folders for all of the new, failing builds and re-ran the builds. This universally seems to have fixed the problem. We're currently experimenting with having each Jenkins run delete the workspace folder as its first action, as we don't need old artifacts as part of our CI process, just the products of the last test action.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM