Build & Deploy

Get an insight on how the solution gets tested, built and deployed and the configuration option of the pipeline.

OpenShift Pipelines (based on Tekton) are used as technology for solution pipelines. The k5-Project-Operator will deploy the pipeline manager and create the needed pipeline definitions in a new k5-project during creating or updating the k5-project. The pipeline manager running in the k5-project is used by the Solution Designer for creating new solution pipelines and trigger them. If a new solution pipeline is created, the pipeline manager creates a new pipeline and additionally needed pipeline resources to run the pipeline for a specific solution. The solution pipeline will create all necessary files, Docker images and Helm charts to deploy, test and run a solution into the k5-project. Each solution pipeline is responsible for deploying only one solution into its k5-project.

Pipelines Types

There are two types of pipelines:

Build & Deploy Pipeline

The Build & Deploy pipeline will first compile and build the solution (Docker images and Helm charts) from the configured Git repository and then deploy the solution into the defined target project.

Deploy Pipeline

The Deploy pipeline uses an existing image created in an earlier stage and deploys it to its defined target project. That means, that one or more Deploy pipelines can use the result of a Build & Deploy pipeline or an another upstream Deploy pipeline. The Deploy pipeline starts automatically whenever the related image in the source project has changed.

Tasks Types

Delete Solution Task

The Delete Solution task is responsible for deleting solution from the defined target project. It can also clean up used pipeline resources.However It does not clean Kafka or database resources.

Deploy Pipeline Configuration

This step is not necessary if the corresponding setting is configured and done by the k5-project-operator( please see Create a k5-Project spec.previousStages). For manually enabling a Deploy pipeline (e.g. test-stage) to get and use the created solution images from a specific source project (e.g. dev-stage), the used service account (pipeline) for running the pipelines needs permissions for pulling imagestreams from the source project (e.g. where the Build & Deploy pipeline is configured). The following templates can be used for that:

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata: 
  name: k5-imagestreams-pipeline-rb
  namespace: dev-stage
roleRef: 
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: k5-imagestreams-pipeline-role
subjects: 
- kind: ServiceAccount
  name: pipeline
  namespace: test-stage
        

General Information

The creation, triggering and deletion of a new pipeline can be done in the Solution Designer. The creation of a new pipeline will also trigger the first execution/run of the pipeline. All created pipelines can then be re-triggered in the Solution Designer manually. Use the Run button in the CI/CD page in the Solution Designer to start a build and/or a deployment of your solution.

Important:

Attention: Please do not create, run or re-trigger a solution's pipeline using the OpenShift Console (Developer view -> Pipelines). Only the Solution Designer should be used for that.