Skip to content

Commit 15138e5

Browse files
authored
Merge pull request #47583 from shipsing/RHDEVDOCS-3904
RHDEVDOCS-3904: Adding a GitHub repository containing pipelines
2 parents 02a89ed + 59da486 commit 15138e5

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed

cicd/pipelines/working-with-pipelines-using-the-developer-perspective.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ The Tekton Hub Integration is enabled by default and you can see tasks from the
3535

3636
For more information, see xref:../../applications/creating_applications/odc-creating-applications-using-developer-perspective.adoc#odc-importing-codebase-from-git-to-create-application_odc-creating-applications-using-developer-perspective[Creating applications using the Developer perspective].
3737

38+
include::modules/odc-adding-a-GitHub-repository-containing-pipelines.adoc[leveloffset=+1]
39+
3840
include::modules/op-interacting-with-pipelines-using-the-developer-perspective.adoc[leveloffset=+1]
3941

4042
include::modules/op-using-custom-pipeline-template-for-git-import.adoc[leveloffset=+1]

images/Git-access-token-secret.png

56.9 KB
Loading

images/Git-access-token.png

63.2 KB
Loading
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
:_content-type: PROCEDURE
2+
[id="odc-adding-a-GitHub-repository-containing-pipelines_{context}"]
3+
4+
= Adding a GitHub repository containing pipelines
5+
6+
In the developer perspective, you can add your GitHub repository containing pipelines to the Openshift Container Platform cluster. This allows you to run pipelines and tasks from your GitHub repository on the cluster when relevant Git events, such as push or pull requests are triggered.
7+
8+
[NOTE]
9+
====
10+
You can add both public and private GitHub repositories.
11+
====
12+
13+
.Prerequisites
14+
* Ensure that your cluster administrator has configured the required GitHub applications in the administrator perspective.
15+
16+
.Procedure
17+
. In the developer perspective, choose the namespace or project in which you want to add your GitHub repository.
18+
. Navigate to *Pipelines* using the left navigation pane.
19+
. Click *Create* -> *Repository* on the right side of the Pipelines page.
20+
. Enter your *Git Repo URL* and the console automatically fetches the repository name.
21+
. Click *Show configuration options*. By default, you see only one option *Setup a webhook*. If you have a GitHub application configured, you see two options:
22+
* *Use GitHub App*: Select this option to install your GitHub application in your repository.
23+
* *Setup a webhook*: Select this option to add a webhook to your GitHub application.
24+
. Set up a webhook using one of the following options in the *Secret* section:
25+
* Setup a webhook using *Git access token*:
26+
+
27+
.. Enter your personal access token.
28+
.. Click *Generate* corresponding to the *Webhook secret* field to generate a new webhook secret.
29+
+
30+
image::Git-access-token.png[]
31+
+
32+
[NOTE]
33+
====
34+
You can click the link below the *Git access token* field if you do not have a personal access token and want to create a new one.
35+
====
36+
37+
* Setup a webhook using *Git access token secret*:
38+
** Select a secret in your namespace from the dropdown list. Depending on the secret you selected, a webhook secret is automatically generated.
39+
+
40+
image::Git-access-token-secret.png[]
41+
42+
. Add the webhook secret details to your GitHub repository:
43+
.. Copy the *webhook URL* and navigate to your GitHub repository settings.
44+
.. Click *Webhooks* -> *Add webhook*.
45+
.. Copy the *Webhook URL* from the developer console and paste it in the *Payload URL* field of the GitHub repository settings.
46+
.. Select the *Content type*.
47+
.. Copy the *Webhook secret* from the developer console and paste it in the *Secret* field of the GitHub repository settings.
48+
.. Select one of the *SSL verification* options.
49+
.. Select the events to trigger this webhook.
50+
.. Click *Add webhook*.
51+
. Navigate back to the developer console and click *Add*.
52+
. Read the details of the steps that you have to perform and click *Close*.
53+
. View the details of the repository you just created.

0 commit comments

Comments
 (0)