Creating an Ionic Android Application on Jenkins

I am trying to get an ionic Android app that works with Jenkins, and almost did it (with a lot of struggle along the way), and now I'm stuck in the final ionic build --androidstep. Of course, it works well locally, and I can also run the build command just described above from the CL in the Jenkins window.

The problem occurs when Jenkins runs the command, it looks for gradlew in the Android SDK folder on the machine, and not in the / android / gradlew platforms, as happens in the cases mentioned above. For wit (changing company / customer names out of the way):

LOCAL:

Running command: /Users/xxxx/Sites/xxxx/xxxx/platforms/android/cordova/build 
ANDROID_HOME=/Users/xxxx/Library/Android/sdk
JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Running: /Users/xxxx/Sites/xxxx/xxxx/platforms/android/gradlew cdvBuildDebug -b /Users/xxxx/Sites/xxxx/xxxx/platforms/android/build.gradle -Dorg.gradle.daemon=true

JENKINS BOX DIRECT CL:

Running command:/Users/xxxx/.jenkins/jobs/xxxx/workspace/platforms/android/cordova/build 
ANDROID_HOME=/Users/xxxx/Library/Android/sdk
JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Running: /Users/xxxx/.jenkins/jobs/xxxx/workspace/platforms/android/gradlew cdvBuildDebug -b /Users/xxxx/Sites/xxxx/xxxx/platforms/android/build.gradle -Dorg.gradle.daemon=true

JENKINS CHALLENGE:

Running command: "/Users/xxxx/.jenkins/jobs/xxxx/workspace/platforms/android/cordova/build" 
ANDROID_HOME=/Users/xxxx/.jenkins/tools/android-sdk/platform-tools
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
[1m[31m/Users/xxxx/.jenkins/jobs/xxxx/workspace/platforms/android/cordova/node_modules/q/q.js:126
                throw e;
                      ^
Error: Could not find gradle wrapper within android sdk. Might need to update your Android SDK.
Looked here: /Users/xxxx/.jenkins/tools/android-sdk/platform-tools/tools/templates/gradle/wrapper

Jenkins Android. , , , sdk jdk, CL, - gradle , , .

? , , .

+4
1

, , , ANDROID_HOME $ANDROID_HOME/build-tools .

0

All Articles