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 header capability on the Solution Pipeline Configuration page. The master data you need to fill out is the following:

Property Description
Type There are 2 types of pipelines: "Build and Deploy" and "Deploy". A "Build and 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 on 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 and Deploy" pipeline. There are two possible options: 1) Use personal Git credentials that were already definined in the Solution Designer 2) Use dedicated Git credentials. In case 2, you will be aksed 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 to 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 and Deploy" the pipeline can be automatically triggered after a change in the Git provider. For "Deploy" it will be triggered after a new image in the source project with the given tag is registered.

This field is optional

Attention: The Auto Deploy for "Build and Deploy" pipelines flag 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 for "Build and 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 k5project (spec.configuration.pipelineManager.webhookUrl). The token secret can be found in the openshift secret k5-git-webhook-secret in the regarding k5project. 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 for "Deploy" pipelines is that the pipeline manager component is able to watch for imagestream changes in an upstream k5project. This can be done manually or by setting spec.previousStages in the k5 project crd instance, please see Create a k5project. For manually enabling the pipeline manager (e.g. of test-stage) to watch for changes of the solution images in another k5project (e.g. dev-stage) the pipeline manager service account (k5-admin-sa) needs the following permission (rolebinding):

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 a 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 Pipeline Configuration page in the Pipeline Configuration tab.

Delete a 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 permanately deleted.