Table plus |
---|
Description | Details |
---|
Common | Some common fields are handled with specific CLI parameters CLI Field | POST Field | Discussion |
---|
plan | planKey | Leave blank to add linked (global) repositories. |
---|
repositoryKey | selectedRepository | Required for add. We have defined some common aliases (case insensitive): BITBUCKET_CLOUD (same as BITBUCKET), BITBUCKET_SERVER (same as STASH), CVS, GIT, GITHUB, MERCURIAL, PERFORCE, |
---|
|
|
...
On 5.6 and higher, there is also BITBUCKET_SERVER which is the same as STASH
repository (or name) | repositoryName | Required for add. |
---|
credentials | varies | 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. |
---|
type | repository.bitbucket.scm | Values are GIT (default) or HG (MERCURIAL is an alias). Only for Bitbucket Cloud. |
---|
| Mercurial |
POST Field | Example POST Value | Discussion |
---|
selectedRepository | 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.repository | bob_swift/cli | Selected repository when using BitBucket. |
---|
repository.bitbucket.username | bob_swift |
---|
|
|
...
| repository.bitbucket.temporary.password | *** |
---|
|
|
...
| repository.bitbucket.password.change | true | Register the password setting. |
---|
repository.hg.repositoryUrl | http://xxx:8001/cli/ | Repository URL when using Mercurial. |
---|
repository.hg.authentication | PASSWORD | Others are SSH_PROXY, KEYFILE. |
---|
repository.hg.username | bob_swift |
---|
|
|
...
|
| repository.hg.password | *** |
---|
|
|
...
...
Best to let it default. | repository.hg.commandTimeout | 180 | A valid integer value is required. Use -1 for unlimited. |
---|
repository.common.quietPeriod.enabled | true | Defaults to false. |
---|
selectedWebRepositoryViewer | bamboo.webrepositoryviewer.provided:noRepositoryViewer | A valid value is required for Bamboo releases < 5.5. |
---|
... |
---|
|
|
...
| There are lots of other fields. Look up the name when needed. |
Code Block |
---|
-a addRepository --name cli-bitbucket --repositoryKey MERCURIAL --credentials bitbucket-cloud --field1 repository.hg.repositoryUrl --value1 https://xxx:8001/cli |
Code Block |
---|
-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 |
Code Block |
---|
-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" |
Code Block |
---|
-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 |
| GIT |
POST Field | Example POST Value | Discussion |
---|
selectedRepository | com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:git | Use as repository key or use one of the aliases. | repository.bitbucket.repository | bob_swift/git-example | Selected repository when using BitBucket. | repository.git.repositoryUrl | <direct url to git repository> | Alternative if not accessing GIT via Bitbucket name. | repository. |
|
|
...
git.authenticationType | PASSWORD or SHARED_CREDENTIALS | Needed on Bitbucket 5.14 and higher at least | repository.git.username | bob_swift | Omit if repository allows anonymous access. | repository. |
|
|
...
git.temporary.password | *** | Omit if repository allows anonymous access. | repository. |
|
|
...
git.password.change | true | Register the password setting. | repository. |
|
|
...
git.branch | master | Branch. Best to let it default. | repository. |
|
|
...
git.commandTimeout | 180 | A valid integer value is required. Use -1 for unlimited. | repository.common.quietPeriod.enabled | true | Defaults to false. | selectedWebRepositoryViewer | bamboo.webrepositoryviewer.provided:noRepositoryViewer | A valid value is required for Bamboo releases < 5.5.s |
Code Block |
---|
-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" |
Code Block |
---|
-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 |
| Bitbucket Cloud |
Div |
---|
POST Field | Example POST Value | Discussion |
---|
selectedRepository | 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.repository | cli |
|
|
|
...
| repository.bitbucket.scm | GIT or HG | CLI defaults to GIT. For Mercurial, recommend using –type HG to simplify | repository.bitbucket.branch | master | Branch. Defaults |
|
|
|
...
correctly, but recommend setting explicitly to make it obvious. | repository.bitbucket.username | automation |
|
|
|
...
| repository.bitbucket.temporary.password | *** |
|
|
|
...
| repository.bitbucket.password.change | true |
|
|
|
...
| repository.bitbucket.commandTimeout | 180 | A valid integer value is required. Use -1 for unlimited. | repository.common.quietPeriod.enabled | true | Defaults to false. |
Code Block |
---|
-a addRepository --name bitbucket-example --repositoryKey BITBUCKET_CLOUD --field "name = example" --credentials bitbucket-cloud -- |
|
|
|
...
field "repository.bitbucket.commandTimeout = 0" |
Code Block |
---|
-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 |
|
| Bitbucket Server(formerly Stash) |
Div |
---|
POST Field | Example POST Value | Discussion |
---|
selectedRepository | 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.projectKey | CLI |
|
|
|
...
Bitbucket project key. Required. | repository.stash.repositoryId | 112 | Numeric repository id. For instance, use getRepositoryList from |
|
|
|
...
Bitbucket CLI to find the id. Required | repository.stash.repositorySlug | cli |
|
|
|
...
For instance, use getRepositoryList from Bitbucket CLI to find the id. Required. | repository.stash.repositoryUrl | ssh://git@examplegear.com:7999/cli/cli.git | This was required, but, it accepted any non-blank value. Do not know if this is actually used by Bamboo. | repository.stash.server | 42949fec-6f88-3cd8-b146-a1189f8dab5 | Application link id to your |
|
|
|
...
Bitbucket server. Use the browser source or Inspect Element support on the list of Configure Application Links screen. | repository.stash.branch | master | Branch. Defaults to master, but recommend setting explicitly to make it obvious. | repository.stash.commandTimeout | 180 | A valid integer value is required. Use -1 for unlimited. | repository.common.quietPeriod.enabled | true | Defaults to false. | repository.common.quietPeriod.period | 10 | Defaults to 10 seconds | repository.common.quietPeriod.maxRetries | 5 | Defaults to 5 times | selectedWebRepositoryViewer | bamboo.webrepositoryviewer.provided:noRepositoryViewer | A valid value is required for Bamboo releases < 5.5. Otherwise let it default. Or use: none:none | repository.stash.useShallowClones | true | Defaults to false | repository.stash.useRemoteAgentCache | true | Defaults to true | repository.stash.useSubmodules | true | Defaults to false | repository.stash.lfs | true | Defaults to false | repository.stash.mirror.id |
| Defaults to blank | repository.stash.mirror.name |
| Defaults to blank | repository.stash.mirror.url |
| Defaults to blank |
Code Block |
---|
-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: |
|
|
|
...
Contribute your validated configuration by asking and answering your own question! |
Tip |
---|
title | Your repository not listed yet? |
---|
|
RecommendationWe recommend following the newer techniques available with 10.4 (see ACLI-2634) 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. Code Block |
---|
-a addRepository --name bitbucket-example --repositoryKey BITBUCKET_SERVER --replace --branch master --targetServer mybitbucket |
|
|
|