You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started.md
+62-10Lines changed: 62 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Getting Started
2
2
3
-
This guide will help you get started installing and setting up the GitOps Promoter. We currently only support
4
-
GitHub, GitHub Enterprise, GitLab and Forgejo (including Codeberg) as the SCM providers. We would welcome any contributions to add support for other providers.
3
+
This guide will help you get started installing and setting up the GitOps Promoter. We currently support
4
+
GitHub, GitHub Enterprise, GitLab, Bitbucket, and Forgejo (including Codeberg) as the SCM providers. We would welcome any contributions to add support for other providers.
You will need to [create a GitHub App](https://docs.github.com/en/developers/apps/creating-a-github-app) and configure
24
24
it to allow the GitOps Promoter to interact with your GitHub repository.
25
25
26
-
27
26
During the creation the GitHub App, you will need to configure the following settings:
28
27
29
28
### Permissions
@@ -38,8 +37,8 @@ During the creation the GitHub App, you will need to configure the following set
38
37
39
38
> [!NOTE]
40
39
> We do support configuration of a GitHub App webhook that triggers PR creation upon Push. However, we do not configure
41
-
> the ingress to allow GitHub to reach the GitOps Promoter. You will need to configure the ingress to allow GitHub to reach
42
-
> the GitOps Promoter via the service promoter-webhook-receiver which listens on port `3333`. If you do not use webhooks
40
+
> the ingress to allow GitHub to reach the GitOps Promoter. You will need to configure the ingress to allow GitHub to reach
41
+
> the GitOps Promoter via the service promoter-webhook-receiver which listens on port `3333`. If you do not use webhooks
43
42
> you might want to adjust the auto reconciliation interval to a lower value using these `promotionStrategyRequeueDuration` and
44
43
> `changeTransferPolicyRequeueDuration` fields of the `ControllerConfiguration` resource.
45
44
@@ -89,7 +88,7 @@ stringData:
89
88
> [!NOTE]
90
89
> This Secret will need to be installed to the same namespace that you plan on creating PromotionStrategy resources in.
91
90
92
-
We also need a GitRepository and ScmProvider, which are custom resources that represent a git repository and a provider.
91
+
We also need a GitRepository and ScmProvider, which are custom resources that represent a git repository and a provider.
93
92
Here is an example of both resources:
94
93
95
94
```yaml
@@ -119,11 +118,11 @@ spec:
119
118
> [!IMPORTANT]
120
119
> Make sure your staging branches (`environment/development-next`, `environment/staging-next`, etc.) are not auto-deleted
121
120
> when PRs are merged. You can do this either by disabling auto-deletion of branches in the repository settings (in
122
-
> Settings > Automatically delete head branches) or by adding a branch protection rule for a matching pattern such as
121
+
> Settings > Automatically delete head branches) or by adding a branch protection rule for a matching pattern such as
123
122
> `environment/*-next` (`/` characters are separators in GitHub's glob implementation, so `*-next` will not work).
124
123
125
124
> [!NOTE]
126
-
> The GitRepository and ScmProvider also need to be installed to the same namespace that you plan on creating PromotionStrategy
125
+
> The GitRepository and ScmProvider also need to be installed to the same namespace that you plan on creating PromotionStrategy
127
126
> resources in, and it also needs to be in the same namespace of the secret it references.
128
127
129
128
## GitLab Configuration
@@ -140,7 +139,7 @@ stringData:
140
139
token: <your-access-token>
141
140
```
142
141
143
-
We also need a GitRepository and ScmProvider, which is are custom resources that represents a git repository and a provider.
142
+
We also need a GitRepository and ScmProvider, which is are custom resources that represents a git repository and a provider.
144
143
Here is an example of both resources:
145
144
146
145
```yaml
@@ -220,10 +219,63 @@ spec:
220
219
name: <your-scmprovider-name> # The secret that contains the GitLab Access Token
221
220
```
222
221
222
+
## Bitbucket Configuration
223
+
224
+
To configure the GitOps Promoter with Bitbucket, you will need to create a repository access token with the appropriate permissions and configure the necessary resources to allow the promoter to interact with your repository.
225
+
226
+
### Creating a Bitbucket Repository Access Token
227
+
228
+
1. Navigate to your repository URL
229
+
2. Click on "Repository settings" in the sidebar
230
+
3. Navigate to "Access tokens"
231
+
4. Click "Create access token"
232
+
5. Give it a name (e.g., "GitOps Promoter")
233
+
6. Select the following permissions:
234
+
* **Repositories**: Read and Write
235
+
* **Pull requests**: Read and Write
236
+
237
+
### Configuration
238
+
239
+
This access token should be used in a secret as follows:
240
+
241
+
```yaml
242
+
apiVersion: v1
243
+
kind: Secret
244
+
metadata:
245
+
name: <your-secret-name>
246
+
type: Opaque
247
+
stringData:
248
+
token: <your-repository-access-token>
249
+
```
250
+
251
+
We also need a GitRepository and ScmProvider, which are custom resources that represent a git repository and a provider.
252
+
Here is an example of both resources:
253
+
254
+
```yaml
255
+
apiVersion: promoter.argoproj.io/v1alpha1
256
+
kind: ScmProvider
257
+
metadata:
258
+
name: <your-scmprovider-name>
259
+
spec:
260
+
secretRef:
261
+
name: <your-secret-name>
262
+
bitbucket: {}
263
+
---
264
+
apiVersion: promoter.argoproj.io/v1alpha1
265
+
kind: GitRepository
266
+
metadata:
267
+
name: <git-repository-ref-name>
268
+
spec:
269
+
bitbucket:
270
+
workspace: <workspace-name>
271
+
repository: <repo-name>
272
+
scmProviderRef:
273
+
name: <your-scmprovider-name>
274
+
```
275
+
223
276
> [!NOTE]
224
277
> The GitRepository and ScmProvider also need to be installed to the same namespace that you plan on creating PromotionStrategy resources in, and it also needs to be in the same namespace of the secret it references.
225
278
226
-
227
279
## Promotion Strategy
228
280
229
281
The PromotionStrategy resource is the main resource that you will use to configure the promotion of your application to different environments.
0 commit comments