nmAndroid
nmAndroid

Reputation: 25

Travis build - Unable to retrieve secret key from key ring file as it does not exist

I currently use Travis CI for my open source project. All went well till I tried to upload an artifact to Maven Central staging repository once the travis build was successful.

Please find the steps i followed below:

I committed the files to Git which triggered a build. The after_success: exits with an error stating "Could not evaluate onlyIf predicate for task ':android-db-migration-library:signArchives'.

Unable to retrieve secret key from key ring file '/home/travis/build/PalomaMobile/android-db-migration/android-db-migration-library/.utility/local.secring.gpg' as it does not exist"

You can view the logs https://travis-ci.org/PalomaMobile/android-db-migration/builds/63114335

From what i understand, the "before install" will decrypt the file and store it and my release script can access it.

Could you please help me understand why this happens. You can view my .travis.yml file, release script file etc.. @ https://github.com/PalomaMobile/android-db-migration

Upvotes: 1

Views: 1111

Answers (1)

Dominic Jodoin
Dominic Jodoin

Reputation: 2538

I double-checked your build log and it seems that your signArchive task is expecting the secret key to be located in

/home/travis/build/PalomaMobile/android-db-migration/android-db-migration-library/.utility/generated.secring.gpg

but in fact it is located in

/home/travis/build/PalomaMobile/android-db-migration/.utility/generated.secring.gpg

So I would suggest using an absolute path to the key file instead of a relative one in your .utility/initiate-publish.sh file.

Hope this helps!

Upvotes: 1

Related Questions