My Android project uses Firebase services which requires a google-services.json to be configured. This json file from Google as a practise is not supposed to be checked into Git. I have also not checked in my json file.
Is it possible to have a Pipeline build file for such a project?
Is it possible to import, use and add into the build and then discard the json file.
Any pointers will be helpful.
Hi Vineet,
You could put the contents of the file into a variable and then write the contents of that variable to the appropriate file at the beginning of your build script. It's best to base64-encode the contents to make sure they survive the trip through the UI.
For example:
base64 < google-services.json
echo $GOOGLE_SERVICES_JSON | base64 --decode > google-services.json
Thank you for reverting back
And yes this works for me.
But I had to write the json file into /opt/atlassian/pipelines/agent/build/app/ for it build correctly.
Is this location cleaned out after the build is done or the files remain in the folder?
Regards,
Vineet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your build runs in a private, isolated container. Any files you create anywhere on the local filesystem will never be accessible to any other build. Shortly after your build finishes the container will be garbage collected (ie. deleted) along with any files you created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.