Waiting state
Hi,
I have a limitation on one of my project to run 1 job each time. When another job is in waiting state i want to send mail to the person who started the job. There is no waiting notify like pass\fail notify. Does someone know what can i do? Thanks, shiran |
6 answers
Hi, Hi shiran, The only thing I can think of is to use the Services Layer API. bju |
Hi, Hi shiran, The only thing I can think of is to use the Services Layer API. bju Do you have an example? or document i can read, to see how i can do it. Thanks |
Hi, Hi shiran, The only thing I can think of is to use the Services Layer API. bju Do you have an example? or document i can read, to see how i can do it. Thanks Hi shiran, This is an example of something you could use to fire a build, wait around for the build to get out of waiting state for 60 seconds, and if still in waiting to run some checks if it is due to another running build. If the build is waiting due to another running build, an email is sent using MIME::Lite.
bju |
This could be very useful for our shop as well, but I am unsure of the implementation.
After modifying the script for our installation, I assume I save it as a .pl file. How do I invoke it from a BuildForge step? It would seem that it cannot be the same project as the one that I have set to a single user, since that one won't run the step until prior jobs have finished. Do I create a separate BF job that calls this script and includes the limited job as a parameter?
|
Hi,
I'm not sure how far along you are, but the first step you'll need is to get the services layer client API code. You can do this by downloading it from your management console host (http://host:port/clients) . There is a link to download both the Java and Perl client code. Once you've got the client and saved the script (yes, .pl is probably the best extension for it), you'll need to include the services layer client in the path when invoking (perl -I/tmp/bf/sl/client my_script.pl or add the path to the env variable PERL5LIB) . The one thing about running the script from another Build Forge step is that you more than likely want to set up a separate user to handle the script because if you use the same user as someone logged into the UI - that UI user will get logged out. The script can be improved as I was just trying to display an example. It would be better as you mention by adding command line parameters, etc. bju |
Thanks!
Hi, |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.