Skip to main content

Description of Pipeline Steps

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

For Generic Service Projects some steps are not applicable and therefore skipped.

Depending on your project stack (Java | Node), the available pipeline types are shown in the Solution Designer (CI/CD page). The pipeline type can be considered as pipeline template from which your service project pipeline will be created.

It is possible to add own pipeline templates to the available types, see Pipeline Customization.

A created pipeline always consists of multiple Pipeline Tasks. The following Tasks are part of the Default Pipeline, but can also be used in custom pipelines.

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

Task steps overview

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

ℹ️note

Some of the Tasks can handle both Stacks (Java / Node). Some of the Tasks are Stack specific.

Task: k5-git-clone

Typically, the first step of every pipeline is the git clone. The k5-git-clone task only consists of the git-clone step that will clone the git project into the /workspace/source folder. The cloned git project can be used in the following Pipeline Tasks.

ParameterValueDescription
PARAM_URLRepository URL to clone from.
PARAM_REVISIONRevision to checkout. (branch, tag, sha, ref, etc...).
PARAM_SKIPtrue | falseSkipping of initial cleanup of workspace folder.

Task: k5-validate

The k5-validate task is responsible for validate the cloned git project in the following steps:

Step: prepare-validate-design-model

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

The validation result is shown in the logs of the pipeline run.

warning

This step only runs for Domain Service Projects, for Generic Service Projects it will be skipped.

ParameterValueDescription
NODE_ENVproductionNode.js configuration to optimize script execution for production environments.

Step: prepare-denormalize-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.

warning

Will only run for Domain Service Projects, for Generic Service Projects it will be skipped.

ParameterValueDescription
NODE_ENVproductionNode.js configuration to optimize script execution for production environments.

Step: 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.

ParameterValueDescription
NODE_ENVproductionNode.js configuration to optimize script execution for production environments.
PRE_RELEASE_UNIQUENESStrue | falseAdds a timestamp to pre-release versions to ensure that every commit gets built without manually changing the version.
ENFORCE_UNIQUENESStrue | falseDefines where uniqueness needs to be enforced by adding the current pipeline id to the version number.
UNIQUE_SEMVER_CHECKtrue | falseWill check if the current version has already been published or not to prevent previous versions to be overwritten unintentionally.
STACKTYPESCRIPT | JAVASCRIPT | NESTJS | JAVAName of the used 'stack'.
SOLUTION_ACRONYMAcronym of the service project.
HELM_REPO_URLURL of the configured helm repository. (value from secret 'k5-helm-repo-binding' and key 'url')
HELM_REPO_USERNAMEUsername for accessing the helm repository. (value from secret 'k5-helm-repo-binding' and key 'username')
HELM_REPO_PASSWORDPassword for accessing the helm repository. (value from secret 'k5-helm-repo-binding' and key 'password')

Task: k5-generate-code-java / k5-generate-code-node

The k5-generate-code-java respectively k5-generate-code-node task is responsible for code generation and consists of the following steps:

Step: build-baw-toolkit

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

The toolkits are downloadable in the Details view of a project in the Solution Envoy.

warning

Will only run for Domain Service Projects, for Generic Service Projects it will be skipped.

ParameterValueDescription
NODE_ENVproductionNode.js configuration to optimize script execution for production environments.

Step: 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.

warning

Will only run for Domain Service Projects, for Generic Service Projects it will be skipped.

ParameterValueDescription
NODE_ENVNode.js configuration to optimize script execution for production environments. For Java based stacks the value is 'production', for Node based stacks keep the value empty.
STACKTYPESCRIPT | JAVASCRIPT | NESTJS | JAVAName of the used 'stack'.
SOLUTION_ACRONYMAcronym of the service project.
MVN_SETTINGSCustomized maven settings. Only for Java based stacks. (value from secret 'k5-build-settings' and key 'mvnSettings')
NPM_SETTINGSCustomized npm settings. Only for Node based stacks. (value from secret 'k5-build-settings' and key 'npmSettings')

Task: k5-build-application-java / k5-build-application-node

The k5-build-application-java respectively k5-build-application-node task is responsible for building the application and consists of the following steps:

Step: 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.

ParameterValueDescription
NODE_ENVNode.js configuration to optimize script execution for production environments. For Java based stacks the value is 'production', for Node based stacks keep the value empty.
STACKTYPESCRIPT | JAVASCRIPT | NESTJS | JAVAName of the used 'stack'.
SOLUTION_ACRONYMAcronym of the service project.
MVN_SETTINGSCustomized maven settings. Only for Java based stacks. (value from secret 'k5-build-settings' and key 'mvnSettings')
NPM_SETTINGSCustomized npm settings. Only for Node based stacks. (value from secret 'k5-build-settings' and key 'npmSettings')

Step: unit-test

This step runs the unit tests for your service project. If any test failure occurs, it will be shown in the logs of the pipeline run and the pipeline run will fail.

This step will be skipped if the pipeline configurations "unit test" flag is set to false.

For projects based on a Node.js stack:

For projects based on a Java stack:

  • The command maven test will be executed.
ParameterValueDescription
NODE_ENVNode.js configuration to optimize script execution for production environments. For Java based stacks the value is 'production', for Node based stacks keep the value empty.
STACKTYPESCRIPT | JAVASCRIPT | NESTJS | JAVAName of the used 'stack'.
SOLUTION_ACRONYMAcronym of the service project.
UNIT_TEST_FEATUREFlag, if unit test feature was activated.
MVN_SETTINGSCustomized maven settings. Only for Java based stacks. (value from secret 'k5-build-settings' and key 'mvnSettings')
NPM_SETTINGSCustomized npm settings. Only for Node based stacks. (value from secret 'k5-build-settings' and key 'npmSettings')

Task: k5-build-publish-image-java / k5-build-publish-image-node

The k5-build-publish-image-java respectively k5-build-publish-image-node task is responsible for building and pushing the container image of the service project and consists of the following step:

Step: build-publish-image

Creates the container 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 container image is published to the Container Registry configured with the pipeline.

ParameterValueDescription
NODE_ENVproductionNode.js configuration to optimize script execution for production environments.
STACKTYPESCRIPT | JAVASCRIPT | NESTJS | JAVAName of the used 'stack'.
SOLUTION_ACRONYMAcronym of the service project.
SERVICE_PROJECT_IMAGE_REGISTRYRegistry, to push the created solution project image to. (value from secret 'k5-image-registry-binding' and key 'url')
DOCKER_AUTH_CONFIGContainer registry authentication data. (JSON data structure)
ADO_UBI_JDK_IMAGE_11Base container image for Java 11 solution projects. Only for Java based stacks.
ADO_UBI_JDK_IMAGE_17Base container image for Java 17 solution projects. Only for Java based stacks.
ADO_DOMAIN_SERVER_IMAGE_TARGET_NAMEBase image name for domain server. Only for Node based stacks.
ADO_DOMAIN_SERVER_IMAGEBase image for domain server. Only for Node based stacks.
ADO_UBI_NODE_IMAGEBase container image for node solution projects. Only for Node based stacks.

Task: k5-build-publish-chart-java / k5-build-publish-chart-node

The k5-build-publish-chart-java respectively k5-build-publish-chart-node task is responsible for building and pushing the helm chart of the service project and consists of the following step:

Step: 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, if it is a Release pipeline. Otherwise the Helm chart is only used locally.

ParameterValueDescription
NODE_ENVproductionNode.js configuration to optimize script execution for production environments.
STACKTYPESCRIPT | JAVASCRIPT | NESTJS | JAVAName of the used 'stack'.
SOLUTION_ACRONYMAcronym of the service project.
PUBLISHtrue | falseFlag to enable the push to the configured helm repository.
SERVICE_PROJECT_IMAGE_REGISTRYRegistry, to push the created solution project image to. (value from secret 'k5-image-registry-binding' and key 'url')
HELM_REPO_URLURL of the configured helm repository. (value from secret 'k5-helm-repo-binding' and key 'url')
HELM_REPO_USERNAMEUsername for accessing the helm repository. (value from secret 'k5-helm-repo-binding' and key 'username')
HELM_REPO_PASSWORDPassword for accessing the helm repository. (value from secret 'k5-helm-repo-binding' and key 'password')
HELM_REPO_UPLOAD_URLURL of the configured helm upload repository. (value from secret 'k5-helm-repo-binding' and key 'uploadUrl')
HELM_REPO_REQUEST_TYPERequest type to upload the helm chart. (value from secret 'k5-helm-repo-binding' and key 'uploadRequestType')
HELM_REPO_UPLOAD_FILE_PATTERNFile pattern for the helm chart upload. (value from secret 'k5-helm-repo-binding' and key 'uploadFilePattern')
ADO_DS_IMAGE_BASETAGDomain server base image tag. Only for Node based stacks.

Task: k5-deploy

The k5-deploy task is only available in a Deploy pipeline and responsible for deploying the service project into the configured deployment target (k5-project) and consists of the following step:

Step: deploy-solution

It deploys the service project's Helm chart into the chosen deployment target (k5-project) associated with the pipeline run. In case of a Release pipeline, this step is skipped.

ParameterValueDescription
NODE_ENVproductionNode.js configuration to optimize script execution for production environments.
STACKTYPESCRIPT | JAVASCRIPT | NESTJS | JAVAName of the used 'stack'.
K5_PROJECTk5 project namespace to install the solution into.
PIPELINE_RUNID of the current pipeline run.
COMPONENT_IMAGE_REGISTRYRegistry, which contains the built solution project image.
REMOTE_LOGIN_FLAGtrueInternal solution deployment flag. (always 'true')
DEPLOYMENT_CONFIGInternal solution deployment configuration.
OC_LOGIN_URLOpenShift login url.