Hello,
I have access to 10 different repositories from our Dev team. From each of the repository I need only one specific file. Each specific file from the repositories will be used by team members or tools who are not allowed to have access to those 10 repositories.
Therefore I'm planning to create another repository which contains each specific file from the 10 repositories. This way it's easier to provide access to these files to team members and tools.
My problem is that these files have to be always up-to-date. If one of the files was updated in one of the 10 repositories it also needs to be automatically updated in my repository.
I wanted to ask what the best practice is to make this process work?
I'm grateful for any advice. Thank you!
Best,
Alexander
That depends on the required access level (read/write/delete), your technology stack and use cases (for example, what happens if one of the files is updated while a user reads it).
For the most simple case, if the systems/users just need read access and you don't care about updates during read, you can use either:
1. Third parties like BitBucket pipelines or ArgoCD, to listen to changes and update the dedicated repo.
2. Have a small service which only returns the specific files directly from BitBucket. See here for a simple CURL example: https://community.atlassian.com/t5/Bitbucket-questions/How-to-download-a-file-from-bitbucket-downloads-during-pipelines/qaq-p/1859283.
3*. This one is more cumbersome but it eliminates the file duplication so I'm putting it here - use submodule or sub-tree. See here:https://community.atlassian.com/t5/Bitbucket-questions/How-to-add-a-subrepository/qaq-p/778446
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.