Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enterprise-4.11] RHDEVDOCS-3904: Adding a GitHub repository containing pipelines #47907

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.