[英]Jenkins Android Gradle Bild Fail
I'm start learning Jenkins for Android. 我开始学习Android版Jenkins。 I have setup Jenkins with Docker on my macosx.
我在macosx上使用Docker设置了Jenkins。 and start Jenkins using this command to create virtual path to my local AndroidSDK
并使用此命令启动Jenkins以创建到本地AndroidSDK的虚拟路径
docker run -p 8080:8080 -v /Users/foo/bar/Android/sdk:/var/android_home -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts
docker run -p 8080:8080 -v /用户/ foo / bar / Android / sdk:/ var / android_home -p 50000:50000 -v jenkins_home:/ var / jenkins_home jenkins / jenkins:lts
However, I cannot build project becuase google-service.json is missing from my git repository. 但是,我无法构建项目,因为git存储库中缺少google-service.json。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDevDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
/var/jenkins_home/workspace/Mappening Project/app/src/dev/debug/google-services.json
/var/jenkins_home/workspace/Mappening Project/app/src/debug/dev/google-services.json
/var/jenkins_home/workspace/Mappening Project/app/src/dev/google-services.json
/var/jenkins_home/workspace/Mappening Project/app/src/debug/google-services.json
/var/jenkins_home/workspace/Mappening Project/app/src/devDebug/google-services.json
/var/jenkins_home/workspace/Mappening Project/app/google-services.json
The question is since google-service.json should not include in repository, what should be the solution ?? 问题是由于google-service.json不应该包含在存储库中,应该怎么解决?
I know the error, but don't want to include this file to remote repository and Jenkins connect to my remote repository to build, but without this file. 我知道错误,但是不想将此文件包含到远程存储库中,并且Jenkins连接到我的远程存储库进行构建,但是没有此文件。
So, it's because of this file should not be on remote repository what should be the solution ??? 因此,由于该文件不应该位于远程存储库中 ,应该怎么解决?
您可以做的是将.json文件保留在macosx系统中,并且在构建过程中,一旦git pull完成,就可以将该文件复制到项目文件夹中。
I use this plugins in order to solved my requirement. 我使用此插件来解决我的要求。
https://wiki.jenkins.io/display/JENKINS/Config+File+Provider+Plugin https://wiki.jenkins.io/display/JENKINS/Config+File+Provider+Plugin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.