Pipelines-as-Code Installation #

Pipelines-as-Code - Installation # Pipelines-as-Code support different installation method to Git provider platforms (i.e: GitHub, Bitbucket and so on) The preferred method to use Pipelines-as-Code is configured with a GitHub Application. Install Pipelines-as-Code infrastructure # Pipelines-as-Code support different installation method to Git provider platforms (ie: GitHub, Bitbucket and so on) The preferred method to use Pipelines-as-Code is configured with a GitHub Application. To get started with Pipelines-as-Code, you need to
Getting started guide.
Getting started with Pipelines-as-Code # This guide will walk you through the process of getting started with Pipelines-as-Code. This will start with the installation of Pipelines-as-Code on your cluster, then the creation of a GitHub Application, the creation of a Repository CR to specify which repository you want to use with Pipelines-as-Code, olnd finally we are going to create a simple Pull Request to test that configuration and see how the Pipelines-as-Code flow looks like.
Installation Through Operator
Installation Through Operator # The easiest way to install Pipelines-as-Code on OpenShift is with the Red Hat Openshift Pipelines Operator. On the OpenShift Pipelines Operator, the default namespace is openshift-pipelines. Note: When Pipelines-as-Code is installed through the Tekton Operator the configurations of Pipelines-as-Code is controlled by TektonConfig Custom Resource. That means Tekton Operator will revert the configurations changes done directly on pipeline-as-code configmap or OpenShiftPipelinesAsCode custom resource. The default configurations for Pipelines-as-Code in TektonConfig looks like below
Manual Installation
Installation # Operator Install # Follow Operator Installation to install Pipelines As Code on OpenShift. Manual Install # Prerequisite # Before installing Pipelines As Code, please verify tektoncd/pipeline is installed. You can install the latest released version using the following command kubectl apply --filename If you are not installing the most recent version, ensure that you have Tekton Pipeline installed and running at a version that is higher than v0.
Pipelines-as-Code configuration settings # There is a few things you can configure through the config map pipelines-as-code in the pipelines-as-code namespace. application-name The name of the application for example when showing the results of the pipelinerun. If youre using the GitHub App you will need to customize the label on the github app setting as well. . Default to Pipelines-as-Code CI secret-auto-create Whether to auto create a secret with the token generated through the GitHub application to be used with private repositories.
Custom certificates
Custom certificates # If you need to configure Pipelines-as-Code with a Git repository that requires a privately signed or custom certificate to access, then you will need to expose the certificate to Pipelines-as-Code. OpenShift # If you have installed Pipelines-as-Code through the OpenShift Pipelines operator, then you will need to add your custom certificate to the cluster via the Proxy object. The operator will expose the certificate in all OpenShift Pipelines components and workloads, including Pipelines-as-Code.
GitHub Apps
Create a Pipelines-as-Code GitHub App # The GitHub App install is different from the other install methods since it acts as the integration point with OpenShift Pipelines and brings the Git workflow into Tekton pipelines. You only need one GitHub App for every user on the cluster usually setup by the admin. You need the webhook of the GitHub App to point to your Pipelines-as-Code Controller route or ingress endpoint which would listen to GitHub events.
GitHub Webhook
Use Pipelines-as-Code with GitHub Webhook # If you are not able to create a GitHub application you can use Pipelines-as-Code with GitHub Webhook on your repository. Using Pipelines-as-Code through GitHub webhook does not give you access to the GitHub CheckRun API, therefore the status of the tasks will be added as a Comment on the PullRequest and not through the Checks Tab. gitops comment (ie: /retest /ok-to-test) with GitHub webhook is not supported.
Use Pipelines-as-Code with Gitlab Webhook # Pipelines-As-Code supports on Gitlab through a webhook. Follow the pipelines-as-code installation according to your Kubernetes cluster. Create GitLab Personal Access Token # Follow this guide to generate a personal token as the manager of the Org or the Project: Note: You can create a token scoped only to the project. Since the token needs to be able to have api access to the forked repository from where the MR come from, it will fail to do it with a project scoped token.
Bitbucket Cloud
Use Pipelines-as-Code with Bitbucket Cloud # Pipelines-As-Code supports on Bitbucket Cloud through a webhook. Follow the Pipelines-As-Code installation according to your Kubernetes cluster. Create Bitbucket Cloud App Password # Follow this guide to create an app password: Check these boxes to add the permissions to the token: Account: Email, Read Workspace membership: Read, Write Projects: Read, Write Issues: Read, Write Pull requests: Read, Write NOTE: If you are going to configure webhook through CLI, you must also add additional permission
Bitbucket Server
Install Pipelines-As-Code on Bitbucket Server # Pipelines-As-Code has a full support of Bitbucket Server. After following the installation: You will have to generate a personal token as the manager of the Project, follow the steps here: The token will need to have the PROJECT_ADMIN and REPOSITORY_ADMIN permissions. Note that the token needs to be able to have access to the forked repository in pull requests, or it would not be able to process and access the pull request.
Kubernetes # Pipelines-as-Code works on kubernetes/minikube/kind. Prerequisites # You will need to pre-install the pipeline release.yaml file on your kubernetes cluster. You will need at least a kubernetes version greater than 1.23 Install # The release YAML to install pipelines are for the released version : kubectl apply -f and for the nightly : kubectl apply -f Verify # Ensure that the pipelines-as-code controller, webhook, and watcher have come up healthy, for example:
Calendar September 13, 2023
Edit Edit this page