Pipeline definition for service projects

There are two pipeline configurations available for Java and Node based (Javascript & TypeScript) service projects.

Release pipeline

The release pipeline is used to release Java or Node based (Javascript & TypeScript) service projects. It is used for both low-code service projects and pro-code service projects.

For pro-code service projects some steps are inapplicable and therefore skipped.

Depending on your project stack (Java | Node), the release pipeline will create the appropriate pipeline run containing one of the following tasks:

These tasks are able to validate, build, test and release its related stack service projects.

Task steps overview

Each pipeline run created from a pipeline configuration will begin by checking out the service project from the Git repository and then run below steps.

Any failure in a step, will be shown in the pipeline run's logs and will cause the pipeline to fail.

prepare-validate-design-model

Validates the design model (API model, domain model and project manifest).

The validation result is saved in a result.json and can be shown in the logs of the pipeline run.

Attention: Will only run for low-code service projects, for pro-code it will be skipped.

prepare-denormalized-domain-model

This step takes a normalized design model of a project and converts it to its denormalized model form.

The denormalized model is needed for the "generate" and "build" steps.

Attention: Will only run for low-code service projects, for pro-code it will be skipped.

prepare-api-spec-gen

This step takes the API namespace's design model files provided as input and creates the API specification files in the format Swagger 2 and OpenApi 3.

Attention: Will only run for low-code service projects, for pro-code it will be skipped.

build-baw-toolkit

The step takes one or more Swagger files and transforms them into IBM Business Automation Workflow importable tool-kits.

The tool-kits are downloadable in the Details view of a project in the Solution Envoy.

Attention: Will only run for low-code service projects, for pro-code it will be skipped.

generate-code

This step takes the domain model of the project and generates/includes all code necessary to produce a working service project action executable.

The resulting artifact will be a Node.js / Spring Boot application that runs inside k5-project deployment.

Attention: Will only run for low-code service projects, for pro-code it will be skipped.

build-code

This step builds the service project's implementation code.

It will run npm compile for Node.js based stacks or maven build for Java stacks. If any errors occur, they will be shown in the logs of the pipeline run and the pipeline run will fail.

handle-version

This step validates service project's version and applies the pipeline's version related configuration pipeline configurations such as adding a timestamp or performing SemVer uniqueness check.

This version will be used as the release version of your service project and also will be part of your released service project's Helm chart name.

If service project version fails the SemVer uniqueness check, it will be shown in the logs of the pipeline run and the pipeline run will fail.

unit-test

This step runs the unit tests for your service project.

This step will be skipped if the pipeline configurations "unit test" flag is set to false. It will run npm test for Node.js based stacks or maven test for Java stacks.

If any test failure occurs, it will be shown in the logs of the pipeline run and the pipeline run will fail.

build-publish-docker

Creates the Docker image containing the service project's built code and all its related artifacts such as IBM BAW toolkit(s) and generated Open API 3.0 / Swagger 2.0 api specifications.

The Docker image is published to the Docker Registry configured with the pipeline.

pack-helm-chart

Creates the Helm chart needed for deploying the service project.

The Helm chart is published to the Helm registry (component repository) configured with the pipeline.

deploy pipeline

It contains exact the same steps as the release pipeline with the addition of below deploy-solution step.

deploy-solution

It deploys the service project's Helm chart into the chosen deployment target (k5-project) associated with the pipeline run.