dimanche 10 juillet 2016

Android Jenkins job not pointing to set keystore path

I am configuring jenkins job for android. For signing the apk I want to use the environment variable set up in server. In my build.gradle i added

signingConfigs {
    release {
        storeFile file(String.valueOf(System.getenv("KEYSTORE")))
        storePassword System.getenv("KEYSTORE_PASSWORD")
        keyAlias System.getenv("KEY_ALIAS")
        keyPassword System.getenv("KEY_PASSWORD")
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release

    }

}

when I run the jenkins job I get the following error.

Execution failed for task ':app:validateReleaseSigning'. 16:10:46.738 [ERROR] [org.gradle.BuildExceptionReporter] > Keystore file /home/jenkins/androidworkspace/SAMPLEPROJECT/app/null not found for signing config 'release'.

I have checked the value of the environment variable and the values are set correctly. I am able to echo them.

How do i get to point to the keystore path specified in the environment variable?

Thanks

P

Aucun commentaire:

Enregistrer un commentaire