How to access .jks file stored in "Azure Secure Files" from "Azure Pipelines" while signing Android apk?
My idea is just to call gradlew assembleRelease to generate and sign apk on Azure Pipeline. Signing in gradle is configured like this:
signingConfigs {
register("release") {
storeFile(file(System.getenv("APK_KEYSTORE")))
storePassword(System.getenv("APK_KEYSTORE_PASSWORD"))
keyAlias(System.getenv("APK_KEY_ALIAS"))
keyPassword(System.getenv("APK_KEY_PASSWORD"))
}
}
It works locally but can't access the APK_KEYSTORE file stored in "secured files" in Azure
What I've already tried and it works is this Android signing task, but I need signing and generating apk locally also, so I need this one example above
How to access .jks file stored in "Azure Secure Files" from "Azure Pipelines" while signing Android apk?
In Azure Pipelines, you couldn't directly use the Secure file from Pipelines -> Library -> Secure files.
You need to add the Download secure file task in the Pipeline. Then the .jks file will be download to $(Agent.TempDirectory). This is the Agent temp folder(e.g. /home/vsts/work/_temp).
Here is an example:

When running the pipeline, the .jks will be downloaded to the local, and then you can find and use it in the temp folder(Path: $(Agent.TempDirectory)/key.jks ).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With