jenkinsci / templating-engine-plugin

create tool-agnostic, templated pipelines to be shared by multiple teams
https://jenkinsci.github.io/templating-engine-plugin/latest/
Apache License 2.0
171 stars 58 forks source link

Application Environment ignores user configuration for `name` #258

Closed steven-terrana closed 2 years ago

steven-terrana commented 2 years ago

PR Details

The ApplicationEnvironment primitive was previously checking the object prior to checking the user provided definition of the application environment in the pipeline configuration.

This meant that for certain fields, such as name, the value would return unexpected results.

fixes #254

Description

Updated the order in which properties on the ApplicationEnvironment class are fetched. We now first check the pipeline configuration definition and then proceed to the object itself. If no property is found, we still return null.

How Has This Been Tested

Unit tests.

Types of Changes

Checklist