Pipeline Definition for Java Custom-Code Solutions

The pipeline is structured in the following procedure (pipeline tasks and steps):

Build & Deploy Pipeline Tasks

The Build & Deploy pipeline for Java Custom-Code Solutions contains the following tasks:

  • k5-build-managed-java
  • k5-deploy

Deploy Pipeline Tasks

The Deploy pipeline for Java Custom-Code Solutions contains the following task:

  • k5-deploy

Task Steps Overview

Task Steps Build (k5-build-managed-java)

  • maven-build
  • prepare-solution-docker
  • pack-Helm-chart
  • pack-installation-image

Task Steps Deploy (k5-deploy)

  • prepare-image
  • prepare-deploy-solution
  • deploy-solution
  • complete-deploy-solution

Task Steps Build (k5-build-managed-java)

The build part of the pipeline prepares the needed k5-project files from the design time, builds and packs the artifacts needed for the deployment:

maven-build

The job mainly follows the build life-cycle basics of Apache Maven. The Custom-Code Solution project will be validated, compiled, tested by executing the provided unit tests and afterwards packaged in its distributable format.

prepare-solution-docker

Creates the Docker image containing the needed denormalized model files for the solution and the deploy jobs of the solution. The created Docker image will be saved as .tar file, packed in the result image (see pack-installation-image) and then used in the deploy-solution step.

pack-Helm-chart

Creates the Helm chart for deploying the solution. This Helm chart is packed in the result image (see pack-installation-image) and then used in the deploy-solution step.

pack-installation-image

Packs the created Helm chart and the solution Docker image (.tar file) into the result image (image name: solutionAcronym:imageTag) and pushes it into the OpenShift Registry. That is needed, so the built solution artifacts can be used in the Deploy part of a Build & Deploy pipeline and in a Deploy pipeline in another k5-project.

Task Steps Deploy (k5-deploy)

The Deploy task of the pipeline deploys the solution into the k5-project and runs the solution tests if they exist:

prepare-image

Copies the image (containing the created solution image and solution Helm chart) from the configured source (project and image tag) into the current k5-project.

prepare-deploy-solution

Unpacks the artifacts (created solution image as .tar file and the solution Helm chart) from the image (see prepare-image step) and pushes the solution image into the current namespace.

deploy-solution

It deploys the solution into the k5-project using solution Helm chart. The needed Helm variables for the solution deployment (configuration name ssob-sdo-values-yaml) are provided by the Configuration Management (see Solution-Specific Configuration).

complete-deploy-solution

Prepares the result image (containing the created solution image and solution Helm chart) for the next stage.