Synchronize Repositories
It is important to know to which git service the synchronization will happen. You need different CLI tools for either Gitea or GitHub.
Synchronize to GitHub
Install the tools from prerequesits section and authenticate to GH to begin the synchronization.
Prerequisits
- Install
gh
tool - Directory as workspace e.g.
~/workspace
Synchronize from Gitea to GitHub
Change directory to tools directory
cd ~/workspace/gitea/infra/otc-metadata/tools/
Run the following command to clone the prefered documentation of one service by selecting service-type and document-type. In our example: We clone the whole user manual from service CCE from internal (Gitea) to external (GitHub) repository. The option --open-pr-gh
opens a Pull Request on GitHub side.
python sync_doc_repo.py --source-environment internal --target-environment public --service-type cce --document-type umn --branch-name main --work-dir ~/workspace/ --open-pr-gh
Synchronize to Gitea
Install the tools from prerequesits section and authenticate to Gitea to begin the synchronization.
Prerequisits
- Install
tea
tool - Directory as workspace e.g.
~/workspace
Synchronize from Gitea to GitHub
Change directory to tools directory
cd ~/workspace/gitea/infra/otc-metadata/tools/
Run the following command to clone the prefered documentation of one service by selecting service-type and document-type. In our example: We clone the whole user manual from service Cloud Container Engine (cce) from external (GitHub) to internal (Gitea) repository.
python sync_doc_repo.py --source-environment public --target-environment internal --service-type cce --document-type umn --branch-name main --work-dir ~/workspace/