From 91af4d64388d3742f0b19d3a9e75f3ba70cb96bb Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Thu, 16 Nov 2023 14:47:04 +0100 Subject: [PATCH] Add private URL example to GitLab URL Atm we do have in a note that private instances (i.e. self-hosted enterprise/private instances) of GitLab are not automatically detected. However we could make it easier for the developers to grasp what do we mean, by adding said field (even in a commented out fashion) in the example This commit add the url for example and as well make sure we use the word GitLab instead of gitlab by enforcing a rule with vale. https://issues.redhat.com/browse/SRVKP-3735 --- .vale/styles/PaaC/GitLab.yml | 7 +++++++ README.md | 4 ++-- docs/content/_index.md | 4 ++-- docs/content/dev/release-process.md | 2 +- docs/content/docs/guide/cli.md | 2 +- docs/content/docs/guide/incoming_webhook.md | 2 +- docs/content/docs/install/gitlab.md | 14 ++++++++------ docs/content/docs/install/overview.md | 2 +- 8 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 .vale/styles/PaaC/GitLab.yml diff --git a/.vale/styles/PaaC/GitLab.yml b/.vale/styles/PaaC/GitLab.yml new file mode 100644 index 000000000..b5741ed65 --- /dev/null +++ b/.vale/styles/PaaC/GitLab.yml @@ -0,0 +1,7 @@ +extends: substitution +message: Use '%s' instead of '%s' +level: error +scope: text +nonword: false +swap: + "Gitlab": GitLab diff --git a/README.md b/README.md index 2d86fe7f4..2fc38da3e 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Pipelines-as-Code features: - `tkn-pac` plug-in for Tekton CLI for managing pipelines-as-code repositories and bootstrapping. -- Gitlab, Bitbucket Server, Bitbucket Cloud and GitHub through Webhook support. +- GitLab, Bitbucket Server, Bitbucket Cloud and GitHub through Webhook support. ## Installation Guide @@ -101,7 +101,7 @@ Note that even if installing with GitHub application is the preferred installati supports other methods : - GitHub direct Webhook -- Gitlab public and private instances. +- GitLab public and private instances. - Bitbucket Cloud - Bitbucket Server diff --git a/docs/content/_index.md b/docs/content/_index.md index 0aae1ecc5..f620f0c09 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -10,7 +10,7 @@ An opinionated CI based on OpenShift Pipelines / Tekton. Pipelines as code is a project allowing you to define your CI/CD using [Tekton](https://tekton.dev) PipelineRuns and Tasks in a file located in your -source control management (SCM) system, such as GitHub or Gitlab. This file is +source control management (SCM) system, such as GitHub or GitLab. This file is then used to automatically create a pipeline for a Pull Request or a Push to a branch. @@ -45,7 +45,7 @@ tracking using a Git workflow. - Git events Filtering and support for separate pipelines for each event -- Gitlab, Bitbucket Server, Bitbucket Cloud and GitHub Webhook support. +- GitLab, Bitbucket Server, Bitbucket Cloud and GitHub Webhook support. - `tkn-pac` plug-in for Tekton CLI for managing pipelines-as-code repositories and bootstrapping. diff --git a/docs/content/dev/release-process.md b/docs/content/dev/release-process.md index 5e5cfee0c..99e827868 100644 --- a/docs/content/dev/release-process.md +++ b/docs/content/dev/release-process.md @@ -28,7 +28,7 @@ git tag v1.2.3 * After a while (gorelease takes sometime) If everything is fine you should have the new version set as pre-release in - github.com/openshift-pipelines/pipelines-as-code/releases + * Edit the release like the other releases has been done with a snippet of the highlight of the release. diff --git a/docs/content/docs/guide/cli.md b/docs/content/docs/guide/cli.md index 4ccfe6c16..a50de10a8 100644 --- a/docs/content/docs/guide/cli.md +++ b/docs/content/docs/guide/cli.md @@ -319,7 +319,7 @@ There is no clean-up of the secret after the run. {{< details "tkn pac webhook add" >}} -### Configure and create webhook secret for GitHub, Gitlab and Bitbucket Cloud provider +### Configure and create webhook secret for GitHub, GitLab and Bitbucket Cloud provider `tkn-pac webhook add [-n namespace]`: Allows you to add new webhook secret for a given provider and update the value of the new webhook secret in the existing `Secret` object used to interact with Pipelines-as-Code diff --git a/docs/content/docs/guide/incoming_webhook.md b/docs/content/docs/guide/incoming_webhook.md index 8e34f36f3..2ba1f68ea 100644 --- a/docs/content/docs/guide/incoming_webhook.md +++ b/docs/content/docs/guide/incoming_webhook.md @@ -149,7 +149,7 @@ The parameter value of `pull_request_number` will be set to `12345` when using t ### Using incoming webhook with webhook based providers -Webhook based providers (i.e: GitHub Webhook, Gitlab, Bitbucket etc..) supports +Webhook based providers (i.e: GitHub Webhook, GitLab, Bitbucket etc..) supports incoming webhook, using the token provided in the git_provider section. Here is an example of a Repository CRD matching the target branch main with a GitHub webhook provider: diff --git a/docs/content/docs/install/gitlab.md b/docs/content/docs/install/gitlab.md index 3a9df7ac1..7484f04a2 100644 --- a/docs/content/docs/install/gitlab.md +++ b/docs/content/docs/install/gitlab.md @@ -1,11 +1,11 @@ --- -title: Gitlab +title: GitLab weight: 13 --- -# Use Pipelines-as-Code with Gitlab Webhook +# Use Pipelines-as-Code with GitLab Webhook -Pipelines-As-Code supports on [Gitlab](https://www.gitlab.com) through a webhook. +Pipelines-As-Code supports on [GitLab](https://www.gitlab.com) through a webhook. Follow the pipelines-as-code [installation](/docs/install/installation) according to your Kubernetes cluster. @@ -64,7 +64,7 @@ $ tkn pac create repo ### Create a `Repository` and configure webhook manually -* From the left navigation pane of your Gitlab repository, go to **settings** --> +* From the left navigation pane of your GitLab repository, go to **settings** --> **Webhooks** tab. * Go to your project and click on *Settings* and *"Webhooks"* from the sidebar on the left. @@ -119,6 +119,7 @@ $ tkn pac create repo spec: url: "https://gitlab.com/group/project" git_provider: + # url: "https://gitlab.example.com/ # Set this if you are using a private GitLab instance secret: name: "gitlab-webhook-config" # Set this if you have a different key in your secret @@ -151,7 +152,7 @@ Below is the sample format for `tkn pac webhook add` $ tkn pac webhook add -n project-pipelines ✓ Setting up GitLab Webhook for Repository https://gitlab.com/repositories/project -? Please enter the project ID for the repository you want to be configured, +? Please enter the project ID for the repository you want to be configured, project ID refers to an unique ID (e.g. 34405323) shown at the top of your GitLab project : 17103 👀 I have detected a controller url: https://pipelines-as-code-controller-openshift-pipelines.apps.awscl2.aws.ospqa.com ? Do you want me to use it? Yes @@ -169,7 +170,7 @@ $ tkn pac webhook add -n project-pipelines There are two ways to update the provider token for the existing `Repository`: -### Update using tkn pac cli +### Update using tkn pac CLI * Use the [`tkn pac webhook update-token`](/docs/guide/cli) command which will update provider token for the existing Repository CR. @@ -197,6 +198,7 @@ You can find the secret name in the `Repository` CR. ```yaml spec: git_provider: + # url: "https://gitlab.example.com/ # Set this if you are using a private GitLab instance secret: name: "gitlab-webhook-config" ``` diff --git a/docs/content/docs/install/overview.md b/docs/content/docs/install/overview.md index f5d892f04..66b4901d9 100644 --- a/docs/content/docs/install/overview.md +++ b/docs/content/docs/install/overview.md @@ -34,6 +34,6 @@ preferences the preferred install method is the GitHub Application method. * [GitHub Application](/docs/install/github_apps). * [GitHub Webhook](/docs/install/github_webhook) -* [Gitlab](/docs/install/gitlab) +* [GitLab](/docs/install/gitlab) * [Bitbucket Server](/docs/install/bitbucket_server) * [Bitbucket Cloud](/docs/install/bitbucket_cloud)