This article explains how to update repository name in Bamboo using Bamboo Command Line Interface (CLI).
...
Use updateRepository action to update the repository name in Bamboo and refer below sample function.
Code Block theme Midnight --action updateRepository --plan TES-TRAIN --repository "CLI Repo" --name "Bamboo CLI Repo" --field repository.stash.repositorySlug=testing --repositoryKey BITBUCKET_SERVER --branch master --targetServer "$BITBUCKET_SERVER" --targetUser "$BITBUCKET_USER" --targetPassword "$BITBUCKET_PASSWORD" --field repository.stash.projectKey=PROJVJ
In above action,
- plan value refers to Bamboo plan key.
- repository value refers to repository name in Bamboo.
- name value refers to new name for Bamboo repository.
- field repository.stash.repositorySlug value refers to the repository name in Bitbucket. Please refer What is a slug in Bitbucket for how to get slug name for Bitbucket repository
- repositoryKey refer refers to repository type.
- branch value refer refers repository branch.
- targetServer value refers to repository URL.
- targetUser value refers to username to authenticate repository URL.
- targetPassword value refers to password to authenticate repository URL.
- field repository.stash.projectKey value refers to Bitbucket project key.
...
Info |
---|
It is recommended to test this scenario in a test environment or run the action with the --simulate parameter to verify the behavior before deploying. |
...