Top-level vs stage-level environment for DEPLOY_TARGET consistency in steps and post
A declarative pipeline needs a single value for DEPLOY_TARGET that is used in stage steps, failure handling, and archiving. The documented approaches are a top-level environment block that provides a pipeline-wide default and a stage-level environment block that is scoped to that stage. The concrete constraint is consistent resolution of the same key across