Custom Pipelines
Custom Pipelines can be used to modify the regular pipelines to deploy projects. They can have additional steps along with the existing deployment steps. Custom pipelines do not have any UI but it is possible to enable/disable custom pipelines.
Prerequisites
Access to the OpenShift Admin Console
Clear understanding of Tekton pipelines, pipeline runs, tasks, task runs, also experience in writing pipelines/tasks using YAML
Enable Custom Pipelines
Login to the OpenShift Admin Console
Navigate to Administration → Custom Resource Definitions
Search for the name k5-project and select the k5-project
Navigate to Instances
Search for the k5-project for which custom pipelines needs to be enabled
Select the k5-project and navigate to YAML
Change the property value of spec.configuration.pipelineManager.useDefaultPipelineTemplates to
false
Click on Save
After saving the Custom Resource Definition custom pipelines are enabled successfully. Proceed with Edit Pipeline Templates to configure custom pipelines
Edit Pipeline Templates
There are different pipeline templates/task available for deploying low-code or pro-code projects. Based on the project type choose a pipeline template/task and do required changes:
Navigate to pipeline templates/tasks in k5-project
Login to the OpenShift Admin Console
Choose a k5-project
Navigate to Pipelines → Pipelines/Tasks
Pipeline Templates
k5-template-build-managed-custom-java → for pro-code projects in Java
k5-template-build-managed-custom-node → for pro-code projects in Node
k5-template-build-managed-ddd-java → for low-code projects in Java
k5-template-build-managed-ddd-node → for low-code projects in Node
Task Templates
k5-build-managed-java → for pro-code projects in Java
k5-build-managed-custom-node → for pro-code projects in Node
k5-build-managed-ddd-java → for low-code projects in Java
k5-build-managed-node → for low-code projects in Node
Update and save the pipeline templates/task as per requirements. Once after saving the changes, the new pipelines created for this k5-project will use the new Custom Pipelines.
Migrating existing Pipelines to new Custom Pipelines
Once after Custom Pipelines are enabled use this step to migrate all existing pipelines in a k5-project to use the new Custom Pipelines.
Login to the OpenShift Admin Console
Navigate to Administration → Custom Resource Definitions
Search for the name k5-project and select the k5-project
Navigate to Instances
Search for the k5-project for which Custom Pipelines needs to be enabled
Select k5-project and navigate to YAML
Change the property value of spec.configuration.pipelineManager.migrateExistingPipelines to
true
Click on Save
After saving the Custom Resource Definition all existing pipelines will use the new custom templates to migrate.
Disable Custom Pipelines
Once after Custom Pipelines are enabled use this step to disable them.
Login to the OpenShift Admin Console
Navigate to Administration → Custom Resource Definitions
Search for the name k5-project and select the k5-project
Navigate to Instances
Search for the k5-project for which Custom Pipelines needs to be disabled
Select k5-project and navigate to YAML
Change the property value of spec.configuration.pipelineManager.useDefaultPipelineTemplates to
true
Click on Save
After saving the Custom Resource Definition a all newly created pipelines will use default pipelines templates. Use the above steps to migrate all existing pipelines to default pipelines.