[英]React Native: How to store android keystore file and its password securely in CircleCI
I am working on integrating circleCI in our react native project.我正在将 circleCI 集成到我们的 react native 项目中。 I started with the first workflow which is android build, which requires the keystore file and it's alias and passwords, to achieve this task, I've used
openssl
to encrypt/decrypt the keystore file and store file's passwords to the circleCI env variables (and for my local environment I'm using react-native-config ).我从第一个工作流程开始,即 android 构建,它需要密钥库文件及其别名和密码,为了完成此任务,我使用
openssl
加密/解密密钥库文件并将文件的密码存储到 circleCI env 变量(和对于我的本地环境,我正在使用react-native-config )。
This is my build.gradle file:这是我的 build.gradle 文件:
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword project.env.get('MYAPP_UPLOAD_STORE_PASSWORD')
keyAlias project.env.get('MYAPP_UPLOAD_KEY_ALIAS')
keyPassword project.env.get('MYAPP_UPLOAD_KEY_PASSWORD')
}
}
}
MYAPP_UPLOAD_STORE_FILE stored in the gradle.properties and the rest in env vars MYAPP_UPLOAD_STORE_FILE 存储在环境变量中的 gradle.properties 和 rest 中
I've git this error我有 git 这个错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> SigningConfig "release" is missing required property "storePassword".
A quick note: I can generate a release APK on my device快速说明:我可以在我的设备上生成发布 APK
Is there any other approach to do this tedious task.有没有其他方法可以完成这项繁琐的任务。 Thanks in advance
提前致谢
I found a good resource which is in the CircleCI Docs itself: deploy-android-applications我在 CircleCI Docs 中找到了一个很好的资源: deploy-android-applications
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.