Using Parameterized Build , you need to define parameters. The meaning of this will be offered to you when you click the Create link.
The parameter name should be a simple name , preferably without spaces, such as Branch . Do not add ${} or %% to the parameter name definition.
In the assembly steps, for example Run the Windows command , you can refer to a parameter with regular package syntax, for example %Branch% .
If you were on a * nix machine, you would use the Execute shell build step and refer to a parameter with regular bash syntax, for example ${Branch}
Please note that even when working on Windows, many Jenkins plugins themselves accept parameters in the * nix syntax, however, the Run Windows batch command will be batch, i.e. %Branch% .
So you can try entering:
echo %Branch%
I also suggest entering only the set string into the string, and it will show you all the environment variables available to you during the build process, which is very useful.
Slav
source share