How To Always Run A Build Step In Jenkins And Ignore Failure
Solution 1:
The simplest way I've found to workaround this is to run an "Execute shell" step to do an incremental SDK update to ensure the Android SDK components are up to date.
Here's my Jenkins CI config for the build steps:
Here's the command:
(for i in {1..30}; doecho y; sleep 1; done) | /opt/android/android-sdk-linux/tools/android update sdk --all --no-ui --filter \
extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository
One subtlety for my environment (I'm currently using Jenkins in the cloud, using CloudBees): I needed to make sure I did not update the platform-tool
or tool
components, as that caused my builds to frequently become unstable and fail. I'm running a Google Inc.:Google APIs:18
emulator, which has seemed a lot more stable for me than newer ones.
Solution 2:
You could use the Naginator plugin to automatically trigger a rebuild if your build fails.
Also, if you have problems with the download you could try setting up a caching proxy server.
Post a Comment for "How To Always Run A Build Step In Jenkins And Ignore Failure"