-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47583 from shipsing/RHDEVDOCS-3904
RHDEVDOCS-3904: Adding a GitHub repository containing pipelines
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
53
modules/odc-adding-a-GitHub-repository-containing-pipelines.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |