Initialize jenkins.yaml

Instead of specifying the build settings in metadata.yaml, the new jenkins.yaml file is used by the NGSS Jenkins Shared Library to configure each project build uniquely.

Run Initialize Command

In the service module directory, run the following command(s) to generate an initial jenkins.yaml for your project:

cd my-service # Only in a multi-module project
mvn filegen:jenkins-yaml -Dinit

This downloads the current jenkins.yaml template from the ckm-deployment-templates Git repository, interpolates (sets) values specific to the project and outputs the initial jenkins.yaml to the root directory of the project.

Remove metadata.yaml build section

The metadata.yaml contained a build field that used to drive the generation of the Jenkinsfiles. However, with this change, it is not needed and can be safely removed.

A note about implicit defaults

ci-file-generator sets only those values that differ from the (sensible) default values to provide a more compact view of the jenkins.yaml configuration in most scenarios.

Similar to the design of the metadata.yaml-based operations, for each jenkins.yaml file corresponding to the project type, there is a default set of values defined which are applied first to the configuration, and can be overridden in the project-level jenkins.yaml. These default values files are located in the shared library itself (in order to more closely track with each change in the logic that uses these fields).

To view the "effective" jenkins.yaml with both defaults and project-level overrides present, run (in the service module):

mvn filegen:jenkins-yaml -DeffectiveYaml [-Dfile=projectRelativeOutputFilePath]

This prints the effective YAML to standard output as well as (optionally) writing to the file specified by -Dfile option.