#1
|
|||
|
|||
How do you choose a failure step?
I would like to create a failure step for a checkout step, but I am not sure how to do that. I have mulitiple checkouts happening in my project, not one after the other. Do I need to create a seperate undo checkout failure step, and set it up as if it were a checkout step? Meaning, declare the branch, repository and files that were checked out but instead of selecting the checkout command, I choose uncheckout? If that's the case, then I do need one for each checkout performed, right? Is there a way to make one failure step for all checkouts? Can two or more but not all failure steps be build when one action step fails.
Also, if an action step fails and that action step is grouped with other steps with the 'Group' action step, would I only need to declare the failure step on the 'Group' step to have each step in the group build that failure step? Every failure step is checked to be build, but if a certain step calls for just one failure step to be build, then only that one step is build while the others are ignored, right? Could there be a conflict when an action step and failure step have a condition build rule, as in, which has the higher priority? Do both of them need one to ensure that the specified failure step is build? Certain steps like '"Group' steps never fail, I assume, so do I need to declare a failure step for every single step, so that not every failure step is build? Is there a way in which a failure step can be build by evaluating if a certain step has been build? I'm guessing it can be done with a build rule written in vbscript, but how? Thank you for your time and help. |
#2
|
|||
|
|||
Re: How do you choose a failure step?
Quote:
Quote:
http://www.visualbuild.com/Manual/stepproperties.htm Quote:
http://www.visualbuild.com/Manual/buildrules.htm http://www.visualbuild.com/Manual/scriptexpressions.htm http://www.visualbuild.com/Manual/objectmodel.htm |
#3
|
|||
|
|||
Thanks.
I was able to write some vbscript and it doesn't give me an error. However, I would like for it to skip undo checkouts failure steps in which the checkout and checkin from a repository were done successfully. This is the build rule that I created: [FECheckout = 1 And FECheckin = 0 Or FECheckout = 0] is true FECheckout is a function that I defined on the Global tab pane in the Script Editor, shown below: Function FECheckout If Step.BuildStatus = vbldStepStatSucceeded Then FECheckout = 1 Else FECheckout = 0 End If End Function Function FECheckin If Step.BuildStatus = vbldStepStatSucceeded Then FECheckin = 1 Else FECheckin = 0 End If End Function I wrote this for each checkout and checkin done. When the checkout and checkin action steps are build, they call the FECheckout and FECheckin functions, respectively. I just write on the Step tab pane in the Script Editor 'FECheckout' for the checkout action step, etc. However, it builds all the undo checkout failure steps instead of skipping the ones that checked out and in successfully or that were not build because they didn't have the chance. Is that the way it should work? The failure steps are build, but nothing is unchecked for those that should be skipped. I would like for it to undo checkouts when a checkout fails or when a checkout is done but a step fails before it is checked back in. I'm think the vbld_StepDone() function is needed, but I'm not sure how it works. Thanks again. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|