Skip to content

Commit

Permalink
RHDEVDOCS-3904: Adding a GitHub repository containing pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
shipsing committed Jul 15, 2022
1 parent e078774 commit 59da486
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ include::modules/op-constructing-pipelines-using-pipeline-builder.adoc[leveloffs

== Creating OpenShift Pipelines along with applications

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

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.

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 59da486

Please sign in to comment.