Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to 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:

Code Block
themeMidnight
--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.

...

...

  •  value refers to Bitbucket project key.
Warning

In this case, do not use the the name parameter.!


Info

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.

...