0

I'm start learning Jenkins for Android. I have setup Jenkins with Docker on my macosx. and start Jenkins using this command to create virtual path to my local 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

However, I cannot build project becuase google-service.json is missing from my git repository.

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 ??

EDIT

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.

So, it's because of this file should not be on remote repository what should be the solution ???

Jongz Puangput
  • 5,527
  • 10
  • 58
  • 96
  • `google-services.json` this file is missing in and should be app folder – Amjad Khan Apr 04 '18 at 05:25
  • 1
    Possible duplicate of [Error "File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it"](https://stackoverflow.com/questions/33866061/error-file-google-services-json-is-missing-from-module-root-folder-the-google) – S.Spieker Apr 04 '18 at 07:34
  • no no, I know the error, but don't want to include it to remote repository and jenkins connect to my remote source to build but without this file, it's because of this file should not be on remote repository what should be the solution ??? – Jongz Puangput Apr 04 '18 at 08:05

2 Answers2

0

What you can do is keep you .json file in macosx system and while building process you can copy that file in your project folder once git pull is completed.

Jay Thakkar
  • 1,392
  • 10
  • 19
0

I use this plugins in order to solved my requirement.

https://wiki.jenkins.io/display/JENKINS/Config+File+Provider+Plugin

Jongz Puangput
  • 5,527
  • 10
  • 58
  • 96