Skip to content

Commit 59da486

Browse files
committed
RHDEVDOCS-3904: Adding a GitHub repository containing pipelines
1 parent e078774 commit 59da486

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ include::modules/op-constructing-pipelines-using-pipeline-builder.adoc[leveloffs
2929

3030
== Creating OpenShift Pipelines along with applications
3131

32-
To create pipelines along with applications, use the *From Git* option in the *Add+* view of the *Developer* perspective. You can view all of your available pipelines and select the pipelines you want to use to create applications while importing your code or deploying an image.
32+
To create pipelines along with applications, use the *From Git* option in the *Add+* view of the *Developer* perspective. You can view all of your available pipelines and select the pipelines you want to use to create applications while importing your code or deploying an image.
3333

3434
The Tekton Hub Integration is enabled by default and you can see tasks from the Tekton Hub that are supported by your cluster. Administrators can opt out of the Tekton Hub Integration and the Tekton Hub tasks will no longer be displayed. You can also check whether a webhook URL exists for a generated pipeline. Default webhooks are added for the pipelines that are created using the *+Add* flow and the URL is visible in the side panel of the selected resources in the Topology view.
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)