Installation Through Operator
This page walks you through installing Pipelines-as-Code on OpenShift using the Red Hat OpenShift Pipelines Operator. Follow these steps if you are running OpenShift rather than standard Kubernetes.
Prerequisites
Before you begin, ensure that:
- Your cluster runs OpenShift 4.10 or higher.
- You have cluster-admin access to install operators.
Install
The recommended way to install Pipelines-as-Code on OpenShift is with the Red Hat OpenShift Pipelines Operator. When you install OpenShift Pipelines 1.7.x or later, Pipelines-as-Code is included automatically.
On the OpenShift Pipelines Operator, the default namespace is openshift-pipelines.
pipelines-as-code ConfigMap or OpenShiftPipelinesAsCode custom resource.Configuration
The default configuration for Pipelines-as-Code in TektonConfig is shown
below.
apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
name: config
spec:
platforms:
openshift:
pipelinesAsCode:
enable: true
settings:
bitbucket-cloud-check-source-ip: 'true'
remote-tasks: 'true'
application-name: Pipelines-as-Code CI
auto-configure-new-github-repo: 'false'
error-log-snippet: 'true'
error-detection-from-container-logs: 'false'
enable-cancel-in-progress-on-pull-requests: 'false'
enable-cancel-in-progress-on-push: 'false'
skip-push-event-for-pr-commits: 'true'
hub-url: 'https://artifacthub.io'
hub-catalog-type: 'artifacthub'
error-detection-max-number-of-lines: '50'
error-detection-simple-regexp: >-
^(?P<filename>[^:]*):(?P<line>[0-9]+):(?P<column>[0-9]+):([
]*)?(?P<error>.*)
secret-auto-create: 'true'
secret-github-app-token-scoped: 'true'
remember-ok-to-test: 'true'You can add or update any supported configuration key for Pipelines-as-Code under settings. After you change the TektonConfig custom resource, the operator updates the pipelines-as-code ConfigMap automatically.
enable is true as shown in the following example:spec:
platforms:
openshift:
pipelinesAsCode:
enable: true
settings:Disabling Pipelines-as-Code
To disable Pipelines-as-Code, set enable: false in the TektonConfig custom resource:
spec:
platforms:
openshift:
pipelinesAsCode:
enable: false
settings: