hello.
i’m doing some experiments with jenkins and I’d like the idea of using dynamic slave agents for our android project. Does someone know if there is a docker image already available for that? I was following this tutorial but I got this error:
Starting agent process: cd “/home/jenkins” && java -jar remoting.jar -workDir /home/jenkins -jar-cache /home/jenkins/remoting/jarCache
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I think this is related to the jvm used in the docker image of the tutorial.
You have to use the same version of Java on the agent and on the controller.
Could you please check if that’s the case?
Bytecode version 52.0 is JDK8, and 55.0 is JDK11.
Please note that JDK8 is not supported anymore since Jenkins 2.357 and 2.361.1 LTS.
If you need more recent Android Docker images, I have created quite a lot of them there: Docker Hub
I will work on iOS builds with Jenkins in the coming months, but I’m not sure I will be able to produce a Docker image.
I have several ideas in mind, one of them being using docker-osx.
So far we have used a mac mini with fastlane to build both ios and android.
Then, since we have our own cloud, I created an Ubuntu VM and started experimenting with Jenkins controller left on the mac mini and the slave on the ubuntu.
One thing not clear: I thought apple hardware was mandatory tobuild ios, is that true?
Ah! That’s interesting. I’m not a ios dev so I never dig into it, I thought that building and signing ipa were all depending on real mac h/w. U never stop learning