Solution pipeline configuration in Solution Designer

The page can be accessed from the CI/CD capability which is located on the navigation bar on the left. On this page it is possible to manage the pipeline configurations.

Create new Pipeline Configuration

To create a new pipeline configuration for a particular namespace use the Create capability on the solution's Pipeline Configuration page. The master data you need to fill out is the following:

Property Description
Type There are 2 types of pipelines: "Build & Deploy" and "Deploy". A "Build & Deploy" pipeline creates (and deploys) your solution from source, while a "Deploy" pipeline uses an existing image created in an earlier stage and deploys that solution into the selected project.

This field is mandatory
Name A unique resource name for your pipeline configuration.

This field is mandatory
Skip Testing This can be used to skip the implemented tests during the pipeline run.

This field is optional

Target project The OpenShift target project into which the solution will be deployed.

This field is mandatory
Image tag With every pipeline run an image will be generated. On successful pipeline execution, the image will be tagged with the value provided in this field.

This field is mandatory

Application Application tag can be used to group multiple deployments in applications.

This field is optional

Git credentials This is only for the "Build & Deploy" pipeline. There are two possible options: 1) Use personal Git credentials that were already defined in the Solution Designer 2) Use dedicated Git credentials. In case 2, you will be asked to fill in the Git username and Git access token.

The Git username is the name of a git user with access to the Git repository of the solution. This user will be used to access the Git repository when running the pipeline.

The Git access token is the token of a Git user with access to the Git repository of the solution. This token will be used to access to the Git repository when running the pipeline.

This field is mandatory

Source project This is only for the "Deploy" pipeline. This is the OpenShift project, where the pipeline will listen for new images.

This field is mandatory

Pipeline source image tag This is only for the "Deploy" pipeline. A pipeline run will be triggered whenever a new image with the given tag is registered in the source project.

This field is mandatory

Auto deploy This can be configured for both types of pipeline configurations. For "Build & Deploy" the pipeline can be automatically triggered after a change in the Git repository. For "Deploy" it will be triggered after a new image is registered in the source project with the given tag.

This field is optional

Attention: The Auto-Deploy flag for Build & Deploy pipelines is only available for solution stored in GitLab or GitHub. In case of using Bitbucket as a Git provider for the solution, the pipeline run must be triggered manually.
Note: A prerequisite for the Auto-Deploy feature for Build & Deploy pipelines is that a webhook (for push events) is activated in the regarding Git repository. This has to be done manually. For creating a webhook (trigger), a webhook URL and secret token is needed. The webhook URL can be configured/found in the k5-project CRD, please see Create a k5-Project (spec.configuration.pipelineManager.webhookUrl). The token secret can be found in the OpenShift secret k5-git-webhook-secret in the regarding k5-project. The following command can be used to get the token:
$ oc -n k5project-namespace get secret k5-git-webhook-secret -o jsonpath='{.data.token}' | base64 -d; echo
Note: A prerequisite for the Auto-Deploy feature for Deploy pipelines is that the pipeline manager component is able to watch for imagestream changes in an upstream k5-project. This can be done manually or by setting spec.previousStages in the k5-project CRD instance, please see Create a k5-Project. For manually enabling the pipeline manager (e.g. of test-stage) to watch for changes of the solution images in another k5-project (e.g. dev-stage) the pipeline manager service account (k5-admin-sa) needs the following permission (role-binding):

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

Run Pipeline Configuration

In order to run a specific pipeline configuration, you can use the inline or header capability Run. The details of latest run will be displayed in the solution's Pipeline Configuration page.

Delete Pipeline Configuration

You can delete a pipeline configuration by using the inline or header Delete capability in the CI/CD page.It is possible to delete one or more pipeline configuration at a time. You will need to confirm the action before the selected pipeline configuration is permanently deleted.