Skip to content

Commit bc378cd

Browse files
authored
Merge pull request #138 from gtrivedi88/docs/address-sme-review
Simplify GitLab integration per RHTAP-6483
2 parents 55a4921 + fcf923f commit bc378cd

2 files changed

Lines changed: 12 additions & 38 deletions

File tree

docs/modules/ROOT/pages/getting-started.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,13 @@ To view the integration test Custom Resource:
6262
oc get integrationtestscenarios -n <tenant-namespace>
6363
----
6464

65-
. **Creates CI checks** on the pull request. {KonfluxName} creates checks for both GitHub and GitLab. The difference is how the integration with {KonfluxName} is managed: for GitHub, a GitHub App is created ahead of time during installation; for GitLab, the webhook is created when the repository is onboarded. Two checks appear:
65+
. **Creates CI checks** on the pull request. Two checks appear:
6666
* One for the build pipeline status
6767
* One for the integration test pipeline status
6868
+
6969
You can click through to view logs and additional information.
70+
+
71+
For GitLab, the webhook is created and configured in the repository.
7072

7173
IMPORTANT: Do not merge this pull request yet. Configure a release first so you can see the full end-to-end flow.
7274

docs/modules/ROOT/pages/installing.adoc

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -160,61 +160,33 @@ NOTE: The installer may log an error about failing to open the browser. This is
160160

161161
== Configure the GitLab integration
162162

163-
If you are using GitLab instead of GitHub, configure the GitLab integration. Create a Project Access Token for each GitLab project that you want to onboard to {TSFShortName}.
163+
If you are using GitLab instead of GitHub, configure the GitLab integration. The installer creates the required namespace and secret for the `default-tenant` automatically during deployment.
164164

165165
=== Prerequisites
166166

167167
* You have started the {TSFShortName} installer container.
168168
* You are logged in to the {OCPShortName} cluster.
169-
* You have a GitLab project that you want to onboard.
169+
* You have prepared the GitLab variables (`GITLAB__HOST`, `GITLAB__GROUP`, `GITLAB__TOKEN`) in your `tsf.env` file.
170170

171171
=== Steps
172172

173-
. In your GitLab project, create a Project Access Token:
174-
.. Navigate to *Settings* > *Access Tokens*.
175-
.. Enter a name for the token, for example, `tsf-integration`.
176-
.. Select the *Maintainer* role.
177-
.. Select the following scopes: `api`, `read_repository`, `write_repository`.
178-
.. Click *Create project access token*.
179-
.. Copy the token value.
180-
181-
. Create a Kubernetes secret in the tenant namespace that contains the GitLab credentials:
182-
+
183-
[source,bash]
184-
----
185-
oc create secret generic gitlab-auth-secret \
186-
-n <tenant-namespace> \
187-
--from-literal=password="$GITLAB__TOKEN" \
188-
--type=kubernetes.io/basic-auth
189-
----
190-
+
191-
The default tenant namespace is `default-tenant`. If multiple namespaces are used, the secret must be created in each namespace where you onboard components. For more information about tenant namespaces, see link:https://konflux-ci.dev/docs/advanced-how-tos/managing/environments/[Managing environments] in the {KonfluxName} documentation.
192-
193-
. Label the secret so that {KonfluxName} can discover it:
194-
+
195-
[source,bash]
196-
----
197-
oc label secret gitlab-auth-secret \
198-
-n <tenant-namespace> \
199-
appstudio.redhat.com/credentials=scm
200-
----
201-
202-
. Annotate the secret with the GitLab host:
173+
. Configure the GitLab integration:
203174
+
204175
[source,bash]
205176
----
206-
oc annotate secret gitlab-auth-secret \
207-
-n <tenant-namespace> \
208-
appstudio.redhat.com/scm.host="$GITLAB__HOST"
177+
tsf integration gitlab \
178+
--group="$GITLAB__GROUP" \
179+
--host="$GITLAB__HOST" \
180+
--token="$GITLAB__TOKEN"
209181
----
210182

211183
=== Verification
212184

213-
Verify that the secret was created:
185+
Verify that the GitLab integration secret was created:
214186

215187
[source,bash]
216188
----
217-
oc get secret gitlab-auth-secret -n <tenant-namespace>
189+
oc get secret tsf-gitlab-integration -n tsf
218190
----
219191

220192
== Configure the Quay integration

0 commit comments

Comments
 (0)