absmach / devops

DevOps scripts for Mainflux IoT platform
Apache License 2.0
23 stars 33 forks source link

Feature: Add Vault scripts as git subtree #153

Open arvindh123 opened 1 month ago

arvindh123 commented 1 month ago

Is your feature request related to a problem? Please describe.

If vault script changes in magistrala repo, then it is need to manually copied to devops repo

Describe the feature you are requesting, as well as the possible use case(s) for it.

To include the files from the docker/addons/vault directory of the repository https://github.com/absmach/magistrala into a folder in your repository using git subtree, you can follow these steps:

1. Add the Remote Repository

First, add the magistrala repository as a remote in your local repository.

git remote add -f magistrala https://github.com/absmach/magistrala.git

2. Fetch the Remote Repository

Fetch the latest changes from the magistrala repository.

git fetch magistrala

3. Add the Subtree

Now, use git subtree to add the specific directory (docker/addons/vault) into a directory of your choice in your repository. For example, if you want to add it under third_party/vault or scripts/vault , you would do:

git subtree add --prefix=scripts/vault magistrala main --squash --prefix=docker/addons/vault

Here’s a breakdown of the command:

4. Update the Subtree (Optional)

If you need to update the subtree later to pull in changes from the magistrala repository, you can do:

git subtree pull --prefix=scripts/vault magistrala main --squash --prefix=docker/addons/vault

This will update the files in scripts/vault with any changes from the docker/addons/vault directory of the magistrala repository.

5. Push Changes to Your Repository

Finally, commit and push the changes to your own repository.

git add .
git commit -m "Added vault files from magistrala using git subtree"
git push origin <your-branch>

This will include the files from the specified directory of the magistrala repository in your repository under the specified folder.

Indicate the importance of this feature to you.

Must-have

Anything else?

No response