In certain cases, you may want to deploy the same codebase to multiple code services (for example, when promoting test code to production). CPaaS customers can do this with the Datica CLI by configuring multiple remotes as follows:
Begin these steps in the top level of the git repository you wish to configure for use with your Datica services.
Then, use the Datica CLI to add each remote:
datica -E <env-name> git-remote add <service-1-name> -r my-service-1
datica -E <env-name> git-remote add <service-2-name> -r my-service-2
<env-name> is the name of your Datica CPaaS environment and
<service-2-name> are the names of the CPaaS code services to which your application will be deployed.
Once this process completes, you'll be able to push to
git push my-service-1 master
git push my-service-2 master
Pushing to Datica from Different Branches
If you need to push a different local branch, such as when testing a hotfix branch on a CPaaS code service you have designated for staging, you can run the following:
git push my-staging-service my-hotfix-branch:master
my-staging-service is the name of the git remote for your staging service and
my-hotfix-branch is the name of the branch that has your updated code.