Skip to content

Commit

Permalink
Merge pull request #47907 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-47583-to-enterprise-4.11

[enterprise-4.11] RHDEVDOCS-3904: Adding a GitHub repository containing pipelines
  • Loading branch information
JStickler committed Jul 18, 2022
2 parents 7e8beb5 + 1bdf93d commit a90e960
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ The Tekton Hub Integration is enabled by default and you can see tasks from the

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].

include::modules/odc-adding-a-GitHub-repository-containing-pipelines.adoc[leveloffset=+1]

include::modules/op-interacting-with-pipelines-using-the-developer-perspective.adoc[leveloffset=+1]

include::modules/op-using-custom-pipeline-template-for-git-import.adoc[leveloffset=+1]
Expand Down
Binary file added images/Git-access-token-secret.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Git-access-token.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions modules/odc-adding-a-GitHub-repository-containing-pipelines.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
:_content-type: PROCEDURE
[id="odc-adding-a-GitHub-repository-containing-pipelines_{context}"]

= Adding a GitHub repository containing pipelines

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.

[NOTE]
====
You can add both public and private GitHub repositories.
====

.Prerequisites
* Ensure that your cluster administrator has configured the required GitHub applications in the administrator perspective.

.Procedure
. In the developer perspective, choose the namespace or project in which you want to add your GitHub repository.
. Navigate to *Pipelines* using the left navigation pane.
. Click *Create* -> *Repository* on the right side of the Pipelines page.
. Enter your *Git Repo URL* and the console automatically fetches the repository name.
. 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:
* *Use GitHub App*: Select this option to install your GitHub application in your repository.
* *Setup a webhook*: Select this option to add a webhook to your GitHub application.
. Set up a webhook using one of the following options in the *Secret* section:
* Setup a webhook using *Git access token*:
+
.. Enter your personal access token.
.. Click *Generate* corresponding to the *Webhook secret* field to generate a new webhook secret.
+
image::Git-access-token.png[]
+
[NOTE]
====
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.
====

* Setup a webhook using *Git access token secret*:
** Select a secret in your namespace from the dropdown list. Depending on the secret you selected, a webhook secret is automatically generated.
+
image::Git-access-token-secret.png[]

. Add the webhook secret details to your GitHub repository:
.. Copy the *webhook URL* and navigate to your GitHub repository settings.
.. Click *Webhooks* -> *Add webhook*.
.. Copy the *Webhook URL* from the developer console and paste it in the *Payload URL* field of the GitHub repository settings.
.. Select the *Content type*.
.. Copy the *Webhook secret* from the developer console and paste it in the *Secret* field of the GitHub repository settings.
.. Select one of the *SSL verification* options.
.. Select the events to trigger this webhook.
.. Click *Add webhook*.
. Navigate back to the developer console and click *Add*.
. Read the details of the steps that you have to perform and click *Close*.
. View the details of the repository you just created.

0 comments on commit a90e960

Please sign in to comment.