Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

StarTeam Repository / isModifiedSince, modifed, etc. #489

bfergus ·
I am attempting to test the ability of QB to act similar to cruise control and trigger a CI build when the repository has changes. We are using Starteam as the repository. I have tried a number of OGNL configurations but most fail as null target. Repository is at root level- using cmd, with OGNL for project Location, Label, and Revision Base Version. See below.

Repository type StarTeam 
Description ------
Project location starteam.mdch.com:49201/${Parent.Name}
User svcdevbuild
Password ************
Convert EOL? yes
Time difference threshhold 300
Use build label? yes
Use frozen label? no
Checkout using stcmd? yes
Path to stcmd executable c:\program files\borland\starteam cross-platform client 2006\stcmd.exe
Datetime format M/d/yy h:mm:ss a
Extra stcmd options -o
Delete uncontrolled files? no
Revision log base build version ${lastSuccessBuild==null?blank:lastSuccessBuild.version}
Quiet period 0
Login mapping ------
Modules

StarTeam view Source path File patterns Recursively Label Destination path
Main /300 Construction Stage ------ yes ${build.getLabel()==blank?blank:convertVersionToLabel(build.getLabel())} ------


Tree is defined as
MDC
PROJECT1
DEV
QA
PROD
PROJECT2
DEV
QA
PROD

Tried the following for the build condition- but they all seem to fail in one way or another... Am I confusing it with the OGNL definition of path, etc in repository? Works fine for checkout.

#build=getLastSuccessBuild(), build.getRepository("Generic").setCheckoutDate(build.getEndDate()), repository["Generic"].isModifiedSince(build) 


Yields message:
target is null for method getRepository


repository["Generic"].isModifiedSince(lastSuccessBuild) 


Yields message:

MethodFailedException: Method "isModifiedSince" failed for object com.pmease.quickbuild.repository.StarTeamRepository@5e71a42c [java.lang.NullPointerException: target is null for method getLabel]

tried a bunch of other things- but this functionality seems to elude me so far. Any assistance is appreciated.
  • replies 8
  • views 3297
  • stars 0
robinshen ADMIN ·
Firstable, please do not use the stcmd option since it requires you specify the cmd date format and the ability such as labeling is limited.
Other errors I've observed:
1. the project location should be set to: starteam.mdch.com:49201/${parent.name}, that is, the reference to parent and name should be in lowercase (follow java convension)
2. normaly the build necessary condition should be defined as: effectingRepositoriesModified

In 2.0, we will document expressions in more detail so that users are not get lost when write their own expressions.

Regards
Robin
bfergus ·
Changed as specified. Project location is now ${parent.name} (Lower case), and using effectingRepositoriesModified for condition. Now get the following error:

2009-05-12 08:49:55,011 [Thread-775] INFO - Checking build necessary condition...
2009-05-12 08:49:55,058 [Thread-775] ERROR - Failed to trigger configuration.
java.lang.RuntimeException: ognl.OgnlException: effectingRepositoriesModified [java.lang.NullPointerException: target is null for method getLabel]
at com.pmease.quickbuild.model.Configuration.evaluateBooleanExpression(Configuration.java:885)
at com.pmease.quickbuild.model.Configuration.trigger(Configuration.java:1060)
at com.pmease.quickbuild.triggeringinstance.ManualTriggeringInstance.execute(ManualTriggeringInstance.java:58)
at com.pmease.quickbuild.model.Queue$BuildRunner.run(Queue.java:240)
at java.lang.Thread.run(Thread.java:619)
Caused by: ognl.OgnlException: effectingRepositoriesModified [java.lang.NullPointerException: target is null for method getLabel]
at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:908)
at ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:54)
at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
at ognl.ASTProperty.getValueBody(ASTProperty.java:96)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)
at com.pmease.quickbuild.model.Configuration.evaluateBooleanExpression(Configuration.java:878)
... 4 more
robinshen ADMIN ·
This is odd, do you mind if backing up your database as XML and sending to [robin At pmease dot com] for diagnostics?
bfergus ·
Just sent the backup. FYI- I've defined both an SVN and StarTeam repository now, and it appears both have the same problem. Of course, I've set both up about the same.. so it could definitely be in my OGNL, etc. Not sure what or how the product interrogates the repository for the change info. Thanks in advance for the help.
robinshen ADMIN ·
I haven't received your email about the backup till now. Can you send it again? Please also cc to [yjshen AT gmail DOT com] just in case my company mail box is too aggresive on spam filtering.

Regards
Robin
bfergus ·
I have resent as directed.
robinshen ADMIN ·
Thanks I've received your email and have found the problem. Resolution is replied to your email.

Regards
Robin
bfergus ·
Just so if anyone else has a similar problem- attached is your email response to my problem.
Hi Byron, 

Restored the database and found the problem:

The tag property of the generic StarTeam repository (SVN repository as well) has been specified as:

${build.getLabel()==blank?blank:convertVersionToLabel(build.getLabel())}

This causes error since build has not yet been generated and will be null when QuickBuild is detecting changes. Please just leave this property as empty and QuickBuild will build from trunk. If you also wants to be able to build from specified tag, just specify the property as: ${var["label"]}. This tells QuickBuild to use value of variable "label" as checkout label if the variable is defined to a non-empty value; otherwise, trunk code will be checked out. Then you can selectively to override the label variable in child configurations if you want to checkout from different labels.

Regards
Robin


I had added this tag thinking it was required to be able to promote older versions of code when we are working ahead. After removing, however, the initial problem is resolved- and I am still able to promote older code versions.

Thanks for your help!