dansiegel / Mobile.BuildTools

The Mobile.BuildTools makes it easier to develop code bases in a clean, consistent, secure, and configurable way. Determine at Build which environment your app needs to run on, and what Client Secrets it should have. Plus many more amazing features!
http://mobilebuildtools.com
MIT License
228 stars 29 forks source link

Help with Azure DevOps Secrets and Google Services implementation. #283

Open MarkLFT opened 3 years ago

MarkLFT commented 3 years ago

Can someone please help.

I have setup a build pipeline in Azure DevOps, but I am failing in two areas, and I am hoping that someone else has found a way to do this and explain to me where I am going wrong.

Firstly, I am using Firebase, so I have uploaded the plist and json files as Secure Files. I have then created a job to pull the json file to the build machine, and give it a reference name of googleServicesJson. Finally I have create a Variable called GoogleServiceJson with a value of $(googleServicesJson.secureFilePath), expecting this will be used in the build process. But I still receive a build error "Failed to Read or Deserialize GoogleServicesJson file: google-services.json" What am I missing here?

Secondly, on my local machine I have an AppSettings.json with my secrets in it. With this the local build works. In Azure I tried to create a Variables Group with the secrets, and the build process could not seem to find them.

So next I deleted the variable Group, and created regular pipeline variables, these could be read, providing I did not click the Encrypted variable option. Does this mean all of the secrets cannot be encrypted variables? And must be plain text variables? This does not seem as safe as it could be. Or again, am I missing something?

This really does look like a great tool, and I am looking forward to using it on more projects, but have to say I seem to be fighting with it a bit at the moment.