Skip to content

Commit b1c20d4

Browse files
authored
Merge pull request #56454 from shreyasiddhartha/RHDEVDOCS-4827
Changes for RHDEVDOCS-4827: Configure pipelines-as-code repo on Git import
2 parents 44b7b09 + cfb388a commit b1c20d4

4 files changed

+31
-7
lines changed

cicd/pipelines/using-pipelines-as-code.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ include::modules/op-customizing-pipelines-as-code-configuration.adoc[leveloffset
4848

4949
* xref:../../cli_reference/tkn_cli/installing-tkn.adoc#installing-tkn[Installing tkn]
5050

51-
* xref:../../cicd/pipelines/op-release-notes.adoc#op-release-notes[{pipelines-title} release notes]
51+
* xref:../../cicd/pipelines/op-release-notes.adoc#op-release-notes[{pipelines-title} release notes]
52+
53+
* xref:../../applications/creating_applications/odc-creating-applications-using-developer-perspective.adoc#odc-creating-applications-using-the-developer-perspective[Creating applications using the Developer perspective]

modules/odc-adding-a-GitHub-repository-containing-pipelines.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
= Adding a GitHub repository containing pipelines
55

6-
In the developer perspective, you can add your GitHub repository containing pipelines to the {product-title} 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.
6+
In the *Developer* perspective, you can add your GitHub repository containing pipelines to the {product-title} 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.
77

88
[NOTE]
99
====
@@ -14,7 +14,7 @@ You can add both public and private GitHub repositories.
1414
* Ensure that your cluster administrator has configured the required GitHub applications in the administrator perspective.
1515

1616
.Procedure
17-
. In the developer perspective, choose the namespace or project in which you want to add your GitHub repository.
17+
. In the *Developer* perspective, choose the namespace or project in which you want to add your GitHub repository.
1818
. Navigate to *Pipelines* using the left navigation pane.
1919
. Click *Create* -> *Repository* on the right side of the Pipelines page.
2020
. Enter your *Git Repo URL* and the console automatically fetches the repository name.
@@ -51,3 +51,8 @@ image::Git-access-token-secret.png[]
5151
. Navigate back to the developer console and click *Add*.
5252
. Read the details of the steps that you have to perform and click *Close*.
5353
. View the details of the repository you just created.
54+
55+
[NOTE]
56+
====
57+
When importing an application using *Import from Git* and the Git repository has a `.tekton` directory, you can configure `pipelines-as-code` for your application.
58+
====

modules/odc-importing-codebase-from-git-to-create-application.adoc

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ The following procedure walks you through the *From Git* option in the *Develope
2121
* *Context Dir* to specify the subdirectory for the application source code you want to use to build the application.
2222
* *Source Secret* to create a *Secret Name* with credentials for pulling your source code from a private repository.
2323
24-
. Optional: You can import a devfile, a Dockerfile, or a builder image through your Git repository to further customize your deployment.
25-
* If your Git repository contains a devfile, a Dockerfile, or a builder image, it is automatically detected and populated on the respective path fields. If a devfile, a Dockerfile, and a builder image are detected in the same repository, the devfile is selected by default.
24+
. Optional: You can import a `Devfile`, a `Dockerfile`, or a `Builder Image` through your Git repository to further customize your deployment.
25+
* If your Git repository contains a `Devfile`, a `Dockerfile`, or a `Builder Image`, it is automatically detected and populated on the respective path fields. If a `Devfile`, a `Dockerfile`, or a `Builder Image` are detected in the same repository, the `Devfile` is selected by default.
2626
* To edit the file import type and select a different strategy, click *Edit import strategy* option.
27-
* If multiple devfiles, Dockerfiles, or builder images are detected, to import a specific devfile, Dockerfile, or a builder image, specify the respective paths relative to the context directory.
27+
* If multiple `Devfiles`, a `Dockerfiles`, or a `Builder Images` are detected, to import a specific instance, specify the respective paths relative to the context directory.
28+
2829

2930
. After the Git URL is validated, the recommended builder image is selected and marked with a star. If the builder image is not auto-detected, select a builder image. For the `https://github.com/sclorg/nodejs-ex` Git URL, by default the Node.js builder image is selected.
3031
.. Optional: Use the *Builder Image Version* drop-down to specify a version.
@@ -51,7 +52,17 @@ The resource name must be unique in a namespace. Modify the resource name if you
5152
You can set the default resource preference for Import by browsing the User Preferences page and clicking *Applications* -> *Resource type* field. The *Serverless Deployment* option is displayed in the *Import from Git* form only if the {ServerlessOperatorName} is installed in your cluster. For further details, refer to the {ServerlessProductName} documentation.
5253
====
5354
54-
. In the *Pipelines* section, select *Add Pipeline*, and then click *Show Pipeline Visualization* to see the pipeline for the application. A default pipeline is selected, but you can choose the pipeline you want from the list of available pipelines for the application.
55+
. In the *Pipelines* section, select *Add Pipeline*, and then click *Show Pipeline Visualization* to see the pipeline for the application. A default pipeline is selected, but you can choose the pipeline you want from the list of available pipelines for the application. If *Configure PAC* is checked and the GitHub App is set up, you can see *Use GitHub App* and *Setup a webhook* options. If GitHub App is not set up, you can see *Setup a webhook* option.
56+
+
57+
[NOTE]
58+
====
59+
The *Add pipeline* checkbox is checked and *Configure PAC* is selected by default if the following criterias are fulfilled:
60+
61+
* Pipeline operator is installed
62+
* `pipelines-as-code` is enabled
63+
* `.tekton` directory is detected in the Git repository
64+
65+
====
5566
5667
. Optional: In the *Advanced Options* section, the *Target port* and the *Create a route to the application* is selected by default so that you can access your application using a publicly available URL.
5768
+

modules/op-configuring-pipelines-as-code-for-a-github-app.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
[role="_abstract"]
1010
GitHub Apps act as a point of integration with {pipelines-title} and bring the advantage of Git-based workflows to OpenShift Pipelines. Cluster administrators can configure a single GitHub App for all cluster users. For GitHub Apps to work with Pipelines as Code, ensure that the webhook of the GitHub App points to the Pipelines as Code event listener route (or ingress endpoint) that listens for GitHub events.
1111

12+
[NOTE]
13+
====
14+
When importing an application using *Import from Git* and the Git repository has a `.tekton` directory, you can configure `pipelines-as-code` for your application.
15+
====
16+
17+
1218
[id="configuring-github-app-for-pac"]
1319
== Configuring a GitHub App
1420

0 commit comments

Comments
 (0)