I have have free Openshift account with 3 gears, I have established a gear as a Jenkins server and configured a DIY cartridge as a slave node following the steps explained here:
The ssh connection between master and slave node works fine. I have fixed the problem of the jenkins cache on the slave.jar following the instructions posted here:
Change user.home system property
I have uploaded on the slave the android-sdk with only the build tools downloaded. This reduced version of the sdk, builds android-studio projects on my local machine successfully, it generates the corresponding APK.
When I create a new jenkins job pointing to a git repository, the code gets downloaded and the ./gradlew assembleRelease starts. All steps work fine until gradle reaches the task app:preDexRelease, jenkins becomes unavailable.
I have also tried to run gradlew manually doing a ssh to the slave machine, though the ssh timeout (unset TMOUT) is disabled, the ssh session disconnects suddenly when the build step preDexRelease is reached. Gradle logs (--debug) don't give any hint of what is happening.
Does anyone have experienced a similar behaviour?
Gradle debug:
...
processing android/support/annotation/Keep.class...
processing android/support/annotation/FractionRes.class...
processing android/support/annotation/DimenRes.class...
processing android/support/annotation/BoolRes.class...
processing android/support/annotation/BinderThread.class...
processing android/support/annotation/CallSuper.class...
processing android/support/annotation/MenuRes.class...
processing android/support/annotation/RequiresPermission$Read.class...
processing android/support/annotation/AnimRes.class...
processing android/support/annotation/Nullable.class...
processing android/support/annotation/ColorRes.class...
processing android/support/annotation/RequiresPermission$Write.class...
processing android/support/annotation/CheckResult.class...
processing android/support/annotation/InterpolatorRes.class...
processing android/support/annotation/LayoutRes.class...
processing android/support/annotation/TransitionRes.class...
processing android/support/annotation/IntRange.class...
processing android/support/annotation/RequiresPermission.class...
processing android/support/annotation/Size.class...
processing android/support/annotation/StringDef.class...
processing android/support/annotation/NonNull.class...
processing android/support/annotation/MainThread.class...
processing android/support/annotation/ArrayRes.class...
processing android/support/annotation/ColorInt.class...
processing android/support/annotation/IntegerRes.class...
processing android/support/annotation/StyleRes.class...
processing android/support/annotation/VisibleForTesting.class...
writing classes.dex; size 6576...
> Building 85% > :app:preDexReleaseConnection to xxxxxxxx.rhcloud.com closed by remote host.
Connection to xxxxxxxx.rhcloud.com closed.
As a test I'm using a simple one activity Android Studio project.
Thank you for your help and advice.