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
Hi @Shubham
I've just tested this on my end—that variable will increment upon re-deploy regardless of whether the step failed or was successful.
You can find if the pipeline has been re-run or not by using this API: Get a pipeline
curl -X GET -u username:app_password 'https://api.bitbucket.org/2.0/repositories/<workspaceID>/repo/pipelines/%7B<REPLACE_WITH_PIPELINE_UUID>%7D'
You will need to replace those placeholder values in the command above wrapped in <> with actual values.
I hope this helps.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.