CVS Checkout Does Not Get Latest Revision
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
eSymptoms
When performing a checkout in CVS during a build, Bamboo does not get the latest revision from the repository. The -D flag will also appear in the build_logs
:
1
2
3
4
simple 03-Sep-2013 14:21:25 Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
simple 03-Sep-2013 14:21:25 Updating source code to revision: 2013-08-20 17:23:15 -0700
command 03-Sep-2013 14:21:25 Running CVS command: 'update -d -P -kb -D 2013-08-20 17:23:15 -0700 '\n ... in: '/bamboo/home/warbamboo501/xml-data/build-dir/TEST-CVS-JOB1/newmodule'\n ... CVSROOT: '/bamboo/cvs/cvsrepo'
simple 03-Sep-2013 14:21:25 Updated source code to revision: 2013-08-20 17:23:15 -0700
Cause
Bamboo is using sticky tags during CVS checkouts that specify a date or time prior to the newest revision checkin.
Resolution
Enable Force Clean Build in the Source Code Checkout task in your plan.
Add the
-DCVS_FORCE_CHECKOUT_TO_LATEST=true
system property to JAVA_OPTS:
For instance running in a Jetty wrapper, edit the
<bamboo-install>/conf/wrapper.conf
to add property as per this example using the defaultwrapper.conf
:1 2 3 4 5 6 7
wrapper.java.additional.1=-server wrapper.java.additional.2=-Dorg.eclipse.jetty.xml.XmlParser.Validating=false wrapper.java.additional.3=-Xms256m wrapper.java.additional.4=-Xmx512m wrapper.java.additional.5=-XX:MaxPermSize=256m wrapper.java.additional.6=-Djava.awt.headless=true wrapper.java.additional.7=-DCVS_FORCE_CHECKOUT_TO_LATEST=true
For instance running Tomcat, you must add the parameter to your JAVA_OPTS. The steps are outlines in the Bamboo EAR-WAR installation guide.
Was this helpful?