Skip to content

Commit aff1470

Browse files
authored
Update USER_GUIDE.adoc (#734)
* Bitbucket Server HTTP access tokens can be used in place of passwords for Git over HTTPS, so there is no need to tell users to configure "Checkout over SSH" behavior. https://confluence.atlassian.com/bitbucketserver080/http-access-tokens-1115142284.html * Synthetic SCM navigator project types were removed more than a year ago. jenkinsci/branch-api-plugin#271 * Hook management is now system configuration. It can be overridden at the folder level.
1 parent 29075f5 commit aff1470

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

docs/USER_GUIDE.adoc

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _Bitbucket Branch Source plugin_ allows use of Bitbucket Cloud and Server
1919
as a multi-branch project source in two different ways:
2020

2121
* *Single repository source*: automatic creation of jobs for branches and pull requests in a specific repository.
22-
* *Team/Project folders*: automatic creation of multi-branch projects for each visible repository in a specific Bitbucket Team or Project.
22+
* *Organization folders*: automatic creation of multi-branch projects for each visible repository in a specific Bitbucket Team or Project.
2323

2424
IMPORTANT: This plugin is not compatible with versions of Bitbucket Server previous to 4.0.
2525

@@ -39,8 +39,9 @@ Once configured, branches and pull requests are automatically created and built
3939

4040
Follow these steps to create a multi-branch project with Bitbucket as a source:
4141

42+
. If using Bitbucket Server, the server base URL needs to be added to the Bitbucket Endpoints first in the "Manage Jenkins" > "System" configuration.
4243
. Create the multi-branch project. This step depends on which multi-branch plugin is installed.
43-
For example, "Multibranch Pipeline" should be available as project type if Pipeline Multibranch plugin is installed.
44+
For example, "Multibranch Pipeline" should be available as a project type if Pipeline Multibranch plugin is installed.
4445
+
4546
image::images/screenshot-1.png[scaledwidth=90%]
4647

@@ -50,7 +51,6 @@ image::images/screenshot-2.png[scaledwidth=90%]
5051

5152
. Set credentials to access Bitbucket API and checkout sources (see "Credentials configuration" section below).
5253
. Set the repository owner and name that will be monitored for branches and pull requests.
53-
. If using Bitbucket Server the server base URL needs to be configured (expand the _Advanced_ section to do it).
5454
+
5555
image::images/screenshot-4.png[scaledwidth=90%]
5656

@@ -59,23 +59,24 @@ image::images/screenshot-4.png[scaledwidth=90%]
5959
image::images/screenshot-5.png[scaledwidth=90%]
6060

6161
[id=bitbucket-scm-navigator]
62-
== Team folders
62+
== Organization folders
6363

64-
Bitbucket _Team/Project Folders_ project type can be used to automatically track branches and pull requests in all repositories
65-
in a Bitbucket Team or Project.
64+
_Bitbucket Team/Project_ repository source can be used in Organization Folder to automatically track branches and pull requests in all Bitbucket Team or Project repositories.
6665

67-
. Create a project of type _Bitbucket Team/Project_. The project name will be proposed automatically as default _Owner_ (or _Team_) name.
66+
. Create a project of type _Organization Folder_.
6867
+
6968
image::images/screenshot-6.png[scaledwidth=90%]
7069

71-
. Configure the repository owner (if the proposed value does not match with the actual team or username). It could be:
72-
.. A Bitbucket Cloud Team name: all repositories in the team are imported as Multibranch projects.
70+
. Add _Bitbucket Team/Project_ repository source
71+
. If you configured more than one _Bitbucket Endpoint_, choose the _Server_ and appropriate _Credential_
72+
. Configure the repository owner. It could be:
73+
.. A Bitbucket Cloud Workspace ID (slug): all repositories in the workspace are imported as Multibranch projects.
7374
.. A Bitbucket Server Project ID: all repositories in the project are imported as Multibranch projects. *Note that the project ID needs to be used instead of the project name*.
7475
.. A regular username: all repositories which the username is owner of are imported.
7576
+
7677
image::images/screenshot-8.png[scaledwidth=90%]
7778

78-
. Save the configuration and an initial indexing process starts, once it finishes a Multibranch
79+
. Save the configuration. The initial indexing process starts. Once it finishes, a Multibranch
7980
project is created for each repository.
8081
+
8182
image::images/screenshot-9.png[scaledwidth=90%]
@@ -85,11 +86,15 @@ image::images/screenshot-9.png[scaledwidth=90%]
8586

8687
The use of https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html[Bitbucket webhooks]
8788
allows to trigger builds on branches and pull requests just when a new commit is done. Bitbucket plugin exposes a special
88-
service to listen to this webhook requests and acts accordingly by triggering a new reindex and finally
89+
service to listen to these webhook requests and acts accordingly by triggering a new reindex and finally
8990
triggering builds on matching branches or pull requests.
9091

91-
For both _Bitbucket Multibranch_ projects and _Bitbucket Team_ projects there is an option in the configuration page
92-
to let Jenkins automatically register the webhooks in all involved repositories.
92+
Go to "Manage Jenkins" / "Configure System" and locate _Bitbucket Endpoints_. For every endpoint where you want webhooks registered automatically,
93+
check "Manage hooks" and select a "Credential" with enough access to add webhooks to repositories. Since the Credential is used at the system level,
94+
it can be a System scoped credential, which will restrict its usage from Pipelines.
95+
96+
For both Bitbucket _Multibranch Pipelines_ and _Organization folders_ there is an "Override hook management" behavior
97+
to opt out or adjust system-wide settings.
9398

9499
image::images/screenshot-4.png[scaledwidth=90%]
95100

@@ -99,37 +104,34 @@ properly configured in _Manage Jenkins_ » _Configure System_
99104
[id=bitbucket-creds-config]
100105
== Credentials configuration
101106

102-
The configuration of the plugin (for both _Bitbucket Multibranch_ projects and _Bitbucket Team/Project_) has
107+
The configuration of the plugin (for both _Bitbucket multibranch pipelines_ and _Bitbucket Workspace/Project organization folders_) has
103108
two credentials to configure:
104109

105110
. *Scan Credentials*: Credentials used to access Bitbucket API in order to discover repositories, branches and pull requests.
106111
If not set then anonymous access is used, so only public repositories, branches and pull requests are discovered and managed.
107-
Note that the Webhooks auto-register feature requires scan credentials to be set.
108112
HTTP Basic Authentication, Access Token and OAuth credentials are supported.
109113
. *Checkout Credentials*: Credentials used to check out sources once the repository, branch or pull request is discovered.
110114
HTTP Basic Authentication, SSH and OAuth credentials are supported.
111-
If not set then _Scan Credentials_ are used.
115+
If not set, then _Scan Credentials_ are used.
112116

113117
image::images/screenshot-3.png[scaledwidth=90%]
114118

115119
=== Access Token
116120

117-
The plugin can make use of an access token (Bitbucket Server only) instead of the standard username/password.
121+
The plugin can make use of a personal access token (Bitbucket Server only) instead of the standard username/password.
118122

119-
First create a new _personal access token_ in Bitbucket as instructed in the https://confluence.atlassian.com/bitbucketserver0716/personal-access-tokens-1086402495.html[Bitbucket Personal Access Tokens Documentation].
123+
First, create a new _personal access token_ in Bitbucket as instructed in the link:https://confluence.atlassian.com/bitbucketserver080/http-access-tokens-1115142284.html[HTTP access tokens | Bitbucket Data Center and Server 8.0 | Atlassian Documentation].
120124
At least allow _read_ access for repositories. If you want the plugin to install the webhooks, allow _admin_ access for repositories.
121125

122-
Then create new _Secret text credentials_ in Jenkins and enter the Bitbucket personal access token value in the _Secret_ field.
123-
124-
When configuring a multi-branch project, add the _Checkout over SSH_ behavior to a branch source, as the token can only be used for the Bitbucket API.
126+
Then create a new _Username with password_ credential in Jenkins, enter the Bitbucket username (not the email) in the _Username_ field and the created access token in the _Password_ field.
125127

126128
=== App Passwords
127129

128130
Bitbucket https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231[deprecated usage of Atlassian account password] for Bitbucket API and Git over HTTPS starting from March 1st, 2022 (Bitbucket Cloud only).
129131

130132
The plugin can make use of an app password instead of the standard username/password.
131133

132-
First create a new _app password_ in Bitbucket as instructed in the https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/[Bitbucket App Passwords Documentation]. At least allow _read_ access for repositories. Also, you may need to allow _read_ and _write_ access for webhooks depending on your pipeline's triggers.
134+
First, create a new _app password_ in Bitbucket as instructed in the https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/[Bitbucket App Passwords Documentation]. At least allow _read_ access for repositories. Also, you may need to allow _read_ and _write_ access for webhooks depending on your pipeline's triggers.
133135

134136
Then create a new _Username with password credentials_ in Jenkins, enter the Bitbucket username (not the email) in the _Username_ field and the created app password in the _Password_ field.
135137

0 commit comments

Comments
 (0)