Hello,
I ship a pre-filled Database with my APK. The DB is located in the Assets directory of the Project.
To use Bitbucket Pipelines to build the APK and upload it to the downloads section, i need to add the DB to the Assets directory (on the build server) before. What is the best way to solve this?
Is Git LFS a solution? The DB is about 90MB.
Or download the DB file from somewhere else? E.g. the download section?
Hi Relaxo,
If it's in the Assets directory of your project, does that mean it has already been pushed to Bitbucket? If so, the it should already be accessible inside of your Pipelines build container. As we clone the entire repository. If you are already using Git LFS then it will automatically be downloaded to the Pipelines build container.
What's the format of the DB files?
Git LFS is typically used for binary files that don't create small diffs. Depending on the format of the DB file you may or may not need it. Git LFS is a solution for pushing it to your repository if it's an appropriate format. Perhaps regular Git of the downloads section could be as well. Again, it all depends on the format of the file.
Thanks,
Phil
Hello Philip,
thanks for your reply.
No, the Assets directory is ignored, caused to big files.
No i'm not currently using Git LFS.
The database is a *.db file. A Data Base File for SQLite3.
The file does not change normally, but it does sometimes.
If I download it from the downloads section, will it take much build time? I don't know the download speed when something is downloaded from Bitbucket to a container on your server.
Kind regards
Relaxo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right. In that case I'd recommend you use Git LFS. Git LFS is used for binary files, which the SQLite Database file is (from my quick Googling).
You can get started by looking at our documentation on Git LFS here: https://confluence.atlassian.com/bitbucket/git-large-file-storage-in-bitbucket-829078514.html
The downloads section is still an option. But Pipelines has no built-in features that integrate well with it, so you'll need to use the Bitbucket REST API to retrieve the files. However, Git LFS is automatically supported in Pipelines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your recommendation.
But I will try it first with a download from Downloads section.
It works well with this line:
curl --user "${BB_AUTH_STRING}" -L "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads/filename.db" --output app/src/main/assets/filename.db
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.