I have one query wrt this BITBUCKET_STEP_RUN_NUMBER variable
I went through this already.
There are some steps configured as deployment, where after running the step, we again get an option to trigger re-deploy like below.
In below case also, will this variable increment if I re-deploy?
I can trigger that re-deploy multiple times, Will increment every time?
Or will it increment in case of failed step only?
Also, How can I know in current run about previous run if it failed or if it was success in case of re-deploy? Is there any API for this?

variable