execute Build forge project from command line
Hi all,
I want to execute a build forge project from command line. I need to run the command from a perl script. I found a tool called bftool, but this tool is from version 7.0.2, i wanted to know if there is something newer. My build forge version is 7.1.1.4. Thanks, Shiran |
20 answers
Hi all, Hi Shiran, You can use the Build Forge Perl services layer client to execute a Build Forge project. To get the Perl services layer client, you can download it from a browser by going to http://<Host>:<Port>/clients . I've included some sample code below that should give you an idea of the statements that will be needed. Of course, you will need to alter the code for things like services layer host, port, user name, password, and project name.
bju |
Hi all, Hi Shiran, You can use the Build Forge Perl services layer client to execute a Build Forge project. To get the Perl services layer client, you can download it from a browser by going to http://<Host>:<Port>/clients . I've included some sample code below that should give you an idea of the statements that will be needed. Of course, you will need to alter the code for things like services layer host, port, user name, password, and project name.
bju Thanks, this is very helpful. Now i am trying to change an exiting environment variable from the script. I want to start a build of specific project but first i want to set a few values of the project environment. I found a few examples to create a new environment. Can you send an example to how i can change existing environment? Thanks, Shiran |
Hi Shiran, Here is some code that displays how to set an environment variable value. use strict; bju |
Hi Shiran, Here is some code that displays how to set an environment variable value. use strict; bju Hi bju, Thanks for your help. I did what you worth and i see in the command line that the variable changed, there was no error. But when i start the build i see in the build forge that the variable was not change and due to that the build failed. I need to change the environment of the build? there is such option? Thanks, Shiran |
Hi, This is an example of changing a build environment entry value. This will only change the environment variable value at the time of starting the build.
bju |
Hi, This is an example of changing a build environment entry value. This will only change the environment variable value at the time of starting the build.
bju Hi bju, It worked for 1 project but now when i try from a different stream or different project i get this message: BuildForge::Ex::APIException: A valid Value must be specified. I see that i get the information, for example: Do you know what is the problem? Thanks for your help, Shiran |
Hi,
It's hard to tell from that information. The message seems to indicate that there may be a problem with the build env value being updated. Without seeing your script code or knowing the variable and its type that you're trying to set though, I'm not sure. If you have access to the Management Console computer and its files, you could look in the <BF_INSTALL_DIR>/server/tomcat/logs/catalina<date>.log to see if the server has more information (stack trace and exception message) indicating why it failed. bju |
Hi, This is from the log: Jul 11, 2010 5:09:24 PM com.buildforge.services.server.text.TextFormatter render WARNING: Missing translation: locale= key= Jul 11, 2010 5:09:24 PM com.buildforge.services.server.api.APIServerConnection process WARNING: !!! com.buildforge.services.common.api.APIException: A valid Value must be specified. at com.buildforge.services.common.api.APIException.invalid(APIException.java:223) at com.buildforge.services.server.manager.BuildEnvironmentEntryManager.updateValue(BuildEnvironmentEntryManager.java:358) at com.buildforge.services.server.api.commands.BuildCommands.updateBuildEnvEntry(BuildCommands.java:512) at com.buildforge.services.server.api.commands.BuildCommands.invoke(BuildCommands.java:139) at com.buildforge.services.server.api.APICommandProcessor.process(APICommandProcessor.java:261) at com.buildforge.services.server.api.APIServerConnection.handleRequest(APIServerConnection.java:206) at com.buildforge.services.server.api.APIServerConnection.process(APIServerConnection.java:153) at com.buildforge.services.server.dispatch.handler.BufferedConnection.run(BufferedConnection.java:243) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:810) Jul 11, 2010 5:09:24 PM com.buildforge.services.server.text.TextFormatter render WARNING: Missing translation: locale= key= Jul 11, 2010 5:09:24 PM com.buildforge.services.server.text.TextFormatter render WARNING: Missing translation: locale= key= Can you help? Thanks, |
Hi,
From the stack trace in your last post, it seems that the build environment entry that you're trying to update is a pulldown. If this is the case, the new pulldown value that you're trying to set must be one of the possible values for that pulldown. bju |
Hi, Thanks! i didn't notice that i don't have it in the pulldown. |
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.