Customize jenkins.yaml

Add, delete, or modify fields and their values based on the needs of the project. In addition to the root-level fields that control the general operation of the project build, there are fields defined for each environment - sandbox, staging, and prod, which can override the values for the fields set within these fields.

Example
enableFortify: true (1)

sandbox:
  enableFortify: false (2)
1 Project-level override that applies to all (see Note) environments
2 Environment-specific override that only applies to the Sandbox build config
The precedence rules are actually a little more complicated when it comes to default environment values and project values. See the Jenkins Shared Library discussion on the topic.
A full listing and description of the available fields is found in the Jenkins Shared Library docs.

As mentioned before, when the project includes the jenkinsfile-generator-tile 1.5.3, there is an additional Maven goal executed, bound to the validate phase, that validates the project jenkins.yaml, printing any errors it finds before failing the build.

During individual builds, this validation can be deactivated by adding the -DvalidateYaml=false option. However, it is important to verify that the jenkins.yaml is correct in order to avoid potential misconfigurations.

To run this validation on-demand, execute the following command in the service module directory after making changes to the file:

mvn filegen:jenkins-yaml -Dvalidate