When I try to clone a plan and I need change the subversion repository for different plan. But it also need specify the repositoryId when I try to "updateRepository". I would like to have automation way to get the repositoryId. Is it possible do it via this CLI?
Thank you.
Yongjun Rong
Hi:
As workarround we execute a HTTP GET to:
http://<my_host>:8085/chain/admin/config/editChainRepository.action?os_username=<my_user>&os_password=<my_password>&planKey=<my_playkey>
using:
<my_host>: your bamboo host:
<my_user>: your bamboo user
<my_password>: your bamboo password
<my_plankey>: is the combination "PROJECT-PLAN" for your project ('-' must be included).
Then you can parse the response and search for repositoryId.
I only test this on bamboo 4.4.5, but maybe works on others versions.
Regards,
Good idea! Although I had to use buildKey instead of planKey for the releases I was testing with (4.2 and 5.0 EAP). Translating that into CLI terms, you can use:
--action renderRequest --quiet --request "/chain/admin/config/editChainRepository.action?buildKey=XXX-DEF" --findReplaceRegex ".*repositoryId=(\d+).*:\$1" To get: 37159110
That only gets the first repository.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bob:
Just as a side note, on windows I had to remove the "\" scape character from \$ on:.*repositoryId=(\d+).*:\$1
So the final sentence that works on windows will be:
--action renderRequest --quiet --request "/chain/admin/config/editChainRepository.action?buildKey=XXX-DEF" --findReplaceRegex ".*repositoryId=(\d+).*:$1"
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you don't have an id already, click on: Create an account
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your quick response. But need another getRepositoryId when specify and plan key and the repo name. No, I will try to access the db directly to get the id as a tempaory workaround.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot use the addRepository because the repository is cloned when I try to clonePlan. I need updateRepository. Or when after clonePlan, it will be great if it can return the repositoryId
I will open an issue. Thank you again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There isn't a way to list existing ones currently. Open an issue. If you run addRepository, then the repository id is returned on the command.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.