How to config jenkinsfile's kubernetes gradle version ? #70
-
The following jenkinsfile is my part of example: containers: [ How to config gradle version and kotlin version for 'thyrlian/android-sdk:latest' image ? @thyrlian |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @Break4ever. If I'm not mistaken, in the given example you use Kubernetes plugin, sorry that I know nothing about it. I understand that you would like to have specific versions of Gradle or Kotlin used in your Android build environment, that's not a problem, but not exactly the way you planned. We don't provide Docker images with all versions of tools, for below reasons:
Having that said, it's just a matter that you can't pull any existing images, but no one can stop you from customizing and building your own image. It's actually fairly simple. From the README, the building command is: docker build --build-arg JDK_VERSION=<jdk_version> --build-arg GRADLE_VERSION=<gradle_version> --build-arg KOTLIN_VERSION=<kotlin_version> --build-arg ANDROID_SDK_VERSION=<android_sdk_version> -t android-sdk android-sdk I've checked Kubernetes plugin's guide, and it seems there is only an option of pulling an image, but not building. However, with the Docker Pipeline, you can build on your own: docker.build("my-image:${env.BUILD_ID}", "--build-arg GRADLE_VERSION=<gradle_version> --build-arg KOTLIN_VERSION=<kotlin_version> -f Dockerfile .") Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @Break4ever.
If I'm not mistaken, in the given example you use Kubernetes plugin, sorry that I know nothing about it. I understand that you would like to have specific versions of Gradle or Kotlin used in your Android build environment, that's not a problem, but not exactly the way you planned.
We don't provide Docker images with all versions of tools, for below reasons: