2.4. Configuring additional Pipelines as Code controllers to support additional GitHub apps
By default, you can configure Pipelines as Code to interact with one GitHub app. In some cases you might need to use more than one GitHub app, for example, if you need to use different GitHub accounts or different GitHub instances such as GitHub Enterprise or GitHub SaaS. If you want to use more than one GitHub app, you must configure an additional Pipelines as Code controller for every additional GitHub app.
Procedure
In the
TektonConfigcustom resource, add theadditionalPACControllerssection to theplatforms.openshift.pipelinesAsCodespec, as in the following example:Example
additionalPACControllerssectionapiVersion: operator.tekton.dev/v1 kind: TektonConfig metadata: name: config spec: platforms: openshift: pipelinesAsCode: additionalPACControllers: pac_controller_2:1 enable: true2 secretName: pac_secret_23 settings: #4 # ...- 1
- The name of the controller. This name must be unique and not exceed 25 characters in length.
- 2
- This parameter is optional. Set this parameter to
trueto enable the additional controller or tofalseto disable the additional controller. The default vaule istrue. - 3
- Set this parameter to the name of a secret that you must create for the GitHub app.
- 4
- This section is optional. In this section, you can set any Pipelines as Code settings for this controller if the settings must be different from the main Pipelines as Code controller.
-
Optional: If you want to use more than two GitHub apps, create additional sections under the
pipelinesAsCode.additionalPACControllersspec to configure a Pipelines as Code controller for every GitHub instance. Use a unique name for every controller.