I have written a jenkins script where i want build no and previous build no.For that i am performing a subtraction operation. i want to perform a subtraction between two variables in jenkins DSL script.
But i am not able to subtract.Ex i want to perform a=b-1 ....
the result what i am getting is always value of b.it does not perform subtraction.
It just assigns value of b to a.
Below is want i want :
build_num = "3"
pre_build_num = build_num-"1"
and result what i want should be pre_build_num = "2".
But i am getting pre_build_num = "3".
any help?