This article explains how to add Bitbucket server repository in from specific Bitbucket project in Bamboo using Bamboo Command Line Interface (CLI).
Instructions
To add an global repository, combine addRepository with repository, repositoryKey, branch, targetServer, targetUser, targetPassword, target Bitbucket project with parameter field and value as repository.stash.projectKey= as shown below:
Code Block theme Midnight --action addRepository --repository “Testing” --repositoryKey BITBUCKET_SERVER --branch master --targetServer "$Bitbucket_Server" --targetUser "$Bitbucket_User" --targetPassword "$Bitbucket_Password" --field repository.stash.projectKey=TEST
To add plan repository, combine addRepository with plan repository, repositoryKey, branch, targetServer, targetUser, targetPassword, target Bitbucket project with parameter field and value as repository.stash.projectKey= as shown below:
Code Block theme Midnight --action addRepository --plan "TES-TRAIN" --repository “Testing” --repositoryKey BITBUCKET_SERVER --branch master --targetServer "$Bitbucket_Server" --targetUser "$Bitbucket_User" --targetPassword "$Bitbucket_Password" --field repository.stash.projectKey=TEST
- Additionally name parameter can be used to name the repository in Bamboo.
...
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. |
...