/
How to change Bitbucket repository for Bamboo plan using Bamboo Command Line Interface (CLI)
How to change Bitbucket repository for Bamboo plan using Bamboo Command Line Interface (CLI)
This article explains how to change the Bitbucket repository for Bamboo plan using Bamboo Command Line Interface (CLI).
Instructions
Use the updateRepository action to change the Bitbucket repository for the Bamboo plan. Refer to the sample function below:
--action updateRepository --plan TES-TRAIN --repository "Testing321" --field repository.stash.repositorySlug=cli --repositoryKey BITBUCKET_SERVER --branch master --targetServer "$BITBUCKET_SERVER" --targetUser "$BITBUCKET_USER" --targetPassword "$BITBUCKET_PASSWORD" --field repository.stash.projectKey=PROJVJ
In the above action:
- plan value refers to Bamboo plan key.
- repository value refers to a repository name in Bamboo.
- field repository.stash.repositorySlug value refers to the repository name in Bitbucket. Refer to What is a slug in Bitbucket for more information on how to get slug name for Bitbucket repository.
- repositoryKey refers to the repository type.
- branch value refers to the repository branch.
- targetServer value refers to repository URL.
- targetUser value refers to the username to authenticate the repository URL.
- targetPassword value refers to password to authenticate repository URL.
- field repository.stash.projectKey value refers to Bitbucket project key.
In this case, do not use the name parameter!
It is recommended to test this scenario in a non-production environment or run the action with the --simulate parameter to verify the behavior before deploying.
, multiple selections available,
Related content
How to add Bitbucket server repository from a Bitbucket project in Bamboo using Bamboo Command Line Interface (CLI)
How to add Bitbucket server repository from a Bitbucket project in Bamboo using Bamboo Command Line Interface (CLI)
More like this
Update the repository name for Bamboo plan using Bamboo Command Line Interface ( CLI)
Update the repository name for Bamboo plan using Bamboo Command Line Interface ( CLI)
More like this
How to establish link between Bitbucket and Bamboo with Atlassian Command Line Interface (CLI)
How to establish link between Bitbucket and Bamboo with Atlassian Command Line Interface (CLI)
More like this
How to add Bitbucket CLI task in a Bamboo job with Run CLI Actions in Bamboo
How to add Bitbucket CLI task in a Bamboo job with Run CLI Actions in Bamboo
More like this
How to automate migrating repositories in Bamboo build plans
How to automate migrating repositories in Bamboo build plans
More like this
updateRepository
updateRepository
Read with this