If you are using Inheritance Projects you can define promotions in base job.
You can then choose some of the promotion processes to be visible in some derived jobs but not others.
If parameter Visible evaluates to "true" or is empty, then it is visible, it is not visible otherwise.
You can also use parameters, e.g. ${PARAMETER_NAME} to reference other parameters.
Note that only default values of the parameters are evaluated, i.e. parameters of the jobs, not the builds are taken into account.
Example configuration
- BASE job which configures promotion process Promotion and also has inheritable parameter IsPromotionVisible.
Visible property is set to reference IsPromotionVisible, i.e. its value is ${IsPromotionVisible}
It also makes sense to hide this parameter from the build screen by selecting Hide behind button on build screen? checkbox in advanced parameter properties.
- DERIVEDEnabled job which inherits from BASE but also references IsPromotionVisible parameter and sets its default value to true.
- DERIVEDDisabled job which inherits from BASE but also references IsPromotionVisible parameter and sets its default value to false.
In this configuration DERIVEDEnabled will show promotion Promotion but DERIVEDDisabled will not show it.