I have the following build environment:
- Ubuntu
- Java 1.6.0_24
- Apache ant 1.8.2
- Jenkins 1.427
- Berth 6.1.26
I can create the release APK (zipaligned and signed) from the command line (in the jenkins workspace area) by running ant release , and then, after typing a hint, enter into the keystore.
However, using the same build command from the Jenkins job, it fails with the following:
release: [echo] Signing final apk... [signjar] Signing JAR: /home/james/.jenkins/workspace/android-sam/androidsam/bin/AndroidSam-unsigned.apk to /home/james/.jenkins/workspace/android-sam/androidsam/bin/AndroidSam-unaligned.apk as mykeystore [signjar] jarsigner: Certificate chain not found for: mykeystore . mykeystore must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain. BUILD FAILED /home/james/tools/android-sdk-linux_x86/tools/ant/main_rules.xml:641: jarsigner returned: 1
In the jenkins ant target step, I set the following properties:
key.store=my-release-key.keystore key.alias=mykeystore key.store.password=<mypass> key.alias.password=<mypass> sdk.dir=/home/james/tools/android-sdk-linux_x86
What could cause jenkins to not sign, causing the same goal from the command line to stop running?
I searched this for a search and found that some people write their own bash scripts to sign their APKs and then run them as shells, but that seems pretty dirty ... any suggestions?
thanks
Jimmy source share