[Anthill-pro] Multiple Source Configurations for the One Product

Jones, Tate tjones at rsasecurity.com
Wed Nov 8 22:16:45 CST 2006


Let's say you have a product 'Fred' with 1.0 and 1.1 version.

 

The build Jobs for both versions are identical, except one is off a CVS
branch and another is a CVS tag.

 

I have created a single project called 'Fred'

I have created two source configurations for 1.0 and 1.1, one build job,
one activity and two workflows that specify the correct source
configurations.

Ie. Fred 1.0 Workflow and Fred 1.1 Workflow 

Both workflows are scheduled to trigger a build every hour.

 

All is working fine until they attempt to perform a build at the same
time and the same agent.  The first workflow is successful and then
second fails when attempting to perform a 'clean up' while other
workflow is running.

 

693902803 ERROR 1350 - org.apache.bsf.BSFException: The application
script threw an exception: java.lang.NullPointerException BSF info:
scripts/cvsdriver/cleanup.bsh at line: 35
com.urbancode.command.CommandException: org.apache.bsf.BSFException: The
application script threw an exception: java.lang.NullPointerException
BSF info: scripts/cvsdriver/cleanup.bsh at line: 35
        at
com.urbancode.command.shell.scripted.ScriptedShellCommand.execute(Script
edShellCommand.java:57)
        at
com.urbancode.devilfish.services.command.CommandExecutionThread.run(Comm
andExecutionThread.java:69)
Caused by: org.apache.bsf.BSFException: The application script threw an
exception: java.lang.NullPointerException BSF info:
scripts/cvsdriver/cleanup.bsh at line: 35
        at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
        at bsh.util.BeanShellBSFEngine.exec(Unknown Source)
        at org.apache.bsf.BSFManager$6.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.bsf.BSFManager.exec(Unknown Source)
        at
com.urbancode.command.shell.scripted.ScriptedShellCommand.execute(Script
edShellCommand.java:53)
        ... 1 more

 

I have tried the following options

 

1. Create a shared lock.  This does not seem to lock the build during
the initial repository check (quiet period).

2. Change the working directory for each source configuration.

 

${anthill3/work.dir}/projects/${bsh:PathHelper.makeSafe(ProjectLookup.ge
tCurrent().getName())}/1.0/

${anthill3/work.dir}/projects/${bsh:PathHelper.makeSafe(ProjectLookup.ge
tCurrent().getName())}/1.1/

 

The main problem is there needs to be two build Jobs.  The build job
contains a "Set Work Dir" step (the build.xml is not in root directory).
I would like to avoid this.

 

I have also tried appending the Workflow name onto the working directory
during the checkout.

 

${anthill3/work.dir}/projects/${bsh:PathHelper.makeSafe(ProjectLookup.ge
tCurrent().getName())}/${bsh:PathHelper.makeSafe(WorkflowLookup.getCurre
ntCase()

.getName())}/

 

or

 

${anthill3/work.dir}/projects/${bsh:PathHelper.makeSafe(ProjectLookup.ge
tCurrent().getName())}/${bsh:PathHelper.makeSafe(WorkflowLookup.getCurre
nt()

.getName())}/

 

However, WorkflowLookup.getCurrent() and WorkflowLookup.getCurrentCase()
are returning null in the source configuration step (during the build).

 

I want to avoid creating two Projects. Eg. "Fred 1.0" and "Fred 1.1".

 

Any suggestions or guidelines to follow for multiple versions of the one
product/project?  

 

Cheers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill-pro/attachments/20061109/03a0bccb/attachment.htm


More information about the Anthill-pro mailing list