Skip to end of banner
Go to start of banner

Change Bitbucket repository for Bamboo plan using Bamboo Command Line Interface (CLI)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This article explains how to change Bitbucket repository for Bamboo plan using Bamboo Command Line Interface (CLI).

Instructions

  1. Use updateRepository action to change the Bitbucket repository for Bamboo plan and refer below sample function.

    --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 above action,

    • plan value refers to Bamboo plan key.
    • repository value refers to repository name in Bamboo.
    • 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 refers to repository type.
    • branch value 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.


Please do not use name parameter in this case.


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.

  • No labels