merge_deployment
Merges the latest version of a deployment from one branch to another. This command only copies the deployment between branches, and not related files like models in the registry. Use the Modelbit Git integration for merging branches.
info
Users with Maintainer and Owner roles can merge deployments to protected branches. Users with the User role can only merge to unprotected branches.
Parameters
mb.merge_deployment(deployment_name=, to_branch=, ...)
deployment_name:strThe name of the deployment.to_branch:strThe name of the destination branch for merging the deployment.from_branch:Optional[str]The name of the origin branch for merging the deployment. By default the current branch is used.
Returns
No value is returned. A success status message is printed if the command is successful.
Examples
Merge a deployment to the prod branch
Copy the deployment example_deployment from the current branch to the prod branch:
mb.merge_deployment("example_deployment", to_branch="prod")
Merge a deployment from the staging branch to the prod branch
Copy the deployment example_deployment from the staging branch to the prod branch:
mb.merge_deployment("example_deployment", from_branch="staging", to_branch="prod")