changes.mady.by.user Bob Swift
Saved on Aug 10, 2022
...
Some common fields are handled with specific CLI parameters
BITBUCKET_CLOUD (same as BITBUCKET), BITBUCKET_SERVER (same as STASH), CVS, GIT, GITHUB, MERCURIAL, PERFORCE, SUBVERSION
New for CLI 7.1 to allow shared credentials to be referenced and their respective fields automatically handled.
Supports Git, Mercurial, and Bitbucket Cloud repositories.
We strongly recommend using to avoid hassles with setting and maintaining authentication fields.
repository.bitbucket.scm
Example POST Value
com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-mercurial:bb
com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-mercurial:hg
Use as repository key or use one of the aliases.
repository.bitbucket.temporary.password
repository.bitbucket.password.change
selectedWebRepositoryViewer
bamboo.webrepositoryviewer.provided:noRepositoryViewer
-a addRepository --name cli-bitbucket --repositoryKey MERCURIAL --credentials bitbucket-cloud --field1 repository.hg.repositoryUrl --value1 https://xxx:8001/cli
-a addRepository --name cli-bitbucket --repositoryKey BITBUCKET --field1 repository.bitbucket.repository --value1 bob_swift/cli --field2 repository.bitbucket.username --value2 bob_swift --field3 repository.bitbucket.temporary.password *** --field4 selectedWebRepositoryViewer --value4 bamboo.webrepositoryviewer.provided:noRepositoryViewer --field5 repository.bitbucket.commandTimeout --value5 180 --field6 repository.bitbucket.password.change --value6 true
-a addRepository --plan XX-XX --name cli --repositoryKey MERCURIAL --fields "repository.hg.repositoryUrl:http://xxx:8001/cli,repository.hg.authentication:PASSWORD,repository.hg.username:,repository.hg.password:,repository.hg.branch:default,repository.hg.commandTimeout:180,selectedWebRepositoryViewer:bamboo.webrepositoryviewer.provided:noRepositoryViewer"
-a addRepository --plan XX-XX --name cli-anonymous --repositoryKey MERCURIAL --field1 repository.hg.repositoryUrl --value1 http://xxx:8001/cli --field2 repository.hg.authentication --value2 PASSWORD
com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:git
repository.git.repositoryUrl
repository.git.authenticationType
repository.git.temporary.password
repository.git.password.change
repository.git.branch
-a addRepository --name cli-bitbucket --repositoryKey BITBUCKET --credentials bitbucket-cloud --field1 repository.git.repository --value1 bob_swift/cli --fields repository.git.branch:master,repository.git.useShallowClones:true"
-a addRepository --name git-example --repositoryKey BITBUCKET --field1 repository.git.repository --value1 bob_swift/git-example --field2 repository.git.username --value2 bob_swift --field3 repository.git.temporary.password --value3 "***" --field4 selectedWebRepositoryViewer --value4 bamboo.webrepositoryviewer.provided:noRepositoryViewer --field5 repository.git.commandTimeout --value5 180 --field6 repository.git.password.change --value6 true --fields repository.bitbucket.scm:GIT,repository.git.branch:master,repository.git.authenticationType:PASSWORD
com.atlassian.bamboo.plugins.stash.atlassian-bamboo-plugin-bitbucket:bb
Use as repository key or use one of the aliases - BITBUCKET or BITBUCKET_CLOUD
repository.bitbucket.branch
-a addRepository --name bitbucket-example --repositoryKey BITBUCKET_CLOUD --field "name = example" --credentials bitbucket-cloud --field "repository.bitbucket.commandTimeout = 0"
-a addRepository --name bitbucket-example --repositoryKey BITBUCKET_CLOUD --field "name = example" --field2 repository.bitbucket.username --value2 automation --field3 repository.bitbucket.temporary.password --value3 *** --field5 branch --value5 master --fields repository.bitbucket.commandTimeout:0
(formerly Stash)
com.atlassian.bamboo.plugins.stash.atlassian-bamboo-plugin-stash:stash-rep
Use as repository key or use one of the aliases - BITBUCKET_SERVER or STASH
repository.stash.repositoryUrl
ssh://git@examplegear.com:7999/cli/cli.git
42949fec-6f88-3cd8-b146-a1189f8dab5
repository.stash.branch
-a addRepository --name bitbucket-example --repositoryKey BITBUCKET_SERVER --field1 repository.stash.projectKey --value1 CLI --field2 repository.stash.repositoryId --value2 112 --field3 repository.stash.repositorySlug --value3 cli --field4 repository.stash.server --value4 42949fec-6f88-3cd8-b146-a1189f8dab5b --field5 branch --value5 master --field6 repository.stash.repositoryUrl --value6 ssh://git@examplegear.com:7999/cli/cli.git --fields repository.stash.commandTimeout:60
We recommend following the newer techniques available with 10.4 and above. targetServer should reference a Bitbucket configuration in acli.properties and there needs to be an Bitbucket application link defined to the server referenced.
targetServer
acli.properties
-a addRepository --name bitbucket-example --repositoryKey BITBUCKET_SERVER --replace --branch master --targetServer https://<bitbucket server> --targetUser xxx --targetPassword ***mybitbucket