Override Working Folder with Starteam/CruiseControl - continuous-integration

For some reason, I can't seem to get CruiseControl.net to checkout code to anywhere but the starteam working folder for a specificed view.
I've tried both overrideViewWorkingDir and overrideFolderWorkingDir, and neither seem to work.
Has anyone been able to do this?

Are you looking for the project's workingDirectory element instead of the starteam override?

<sourcecontrol type="starteam">
<executable>C:\Program Files\starbase\StarTeam 5.4\stcmd.exe</executable>
<project>ProjectName/ViewName</project>
<username>UserName</username>
<password>Password</password>
<host>127.0.0.1</host>
<port>49201</port>
<autoGetSource>true</autoGetSource>
<overrideViewWorkingDir>C:\temp\ProjectName</overrideViewWorkingDir>
</sourcecontrol>

Works fine for me with ccnet 1.4.3 and Startem Cross-Platform Client 2008 R2. Make sure XML is valid. I had overrideViewWorkingDir tag not properly closed and ccnet was ignoring it. Found it by running ccnet.exe from the command line instead of as a service. Also you can use Process Explorer from SysInternals to view command line arguments passed to stcmd.exe

Make sure your working folder properties are set to a relative and not a full path (ex: MyFolder instead of C:\MyProject\MyFolder) or it will override the override. I've seen files checked out to some very odd places in the past when people mistakenly put in full paths when adding a folder to a view.

Related

Joomla "Fatal error: Cannot redeclare jblogerror() in on line 0"

Here is a weird problem i'm facing; after updating Joomla to the latest version, website failed to up load but, as i've made a backup manually from these folders:
administrator
bin
cli
components
includes
layouts
libraries
modules
plugins
yt-assets
and all the root files, after restoring the backup still the website is not loading and just says
"Fatal error: Cannot redeclare jblogerror() in on line 0" !
Any suggestion? Thank you.
Apparently, the version of jBlog you are using is loading its attempting to load its own classes twice.
Let's assume the jBlog developers already fixed it and you carelessly ignored the warning to ensure all your extensions are compatible before updating.
Are you able to access administrator? Simply go there and upgrade jBlog including any modules.
Else, the issue lies within a plugin. In order to access the administrator and perform the update, you will need to manually disable the offending plugin.
A simple way is to rename its folder: start from plugins/system then plugins/content hopefully you'll have spotted it by then. Look into the subfolders of each and spot any that may be relevant to jBlog (or grep through the folder to locate the specific string)
If you have console access, simply run
# grep -rl jblogerror plugins/system
and you should see all the files that include such string, just rename their main plugin folder. But you could also do all this through ftp and guessing.

Can't build a VS project on macOS

I get "Sharing violation on path" error whenever I try to build a VS project on macOS if the project is not in Users/../projects folder. I keep my work files on separate drive (exFat) which is perfectly accessable and works fine both under windows and macOS.
I assume it happens because of some permissions' violation but I am very new to macOS and can't figure it out.
macOS version - Mojave
Fixed in the way like kinhoon said, thanks.
One useful side note: we can use "Home" env variable instead of hardcoded users/<user_id> folder
<IntermediateOutputPath Condition=" '$(OS)' == 'Unix' ">$(Home)\path_to_folder\$(Platform)\$(Configuration)</IntermediateOutputPath>
Looks like it's a bug related to the way OS or VS handles writing on file systems FAT and exFAT.
https://www.feval.ca/posts/fixing-cs2012/#fn:1
I found another solution, which you can still keep your code in exFAT.
https://xamarin.github.io/bugzilla-archives/15/15093/bug.html
The solution in the above link suggests to manually edit the project file and put the following line into the build configuration to put the intermediate files in your Mac volume:
<IntermediateOutputPath Condition=" '$(OS)' == 'Unix' ">\Users\your_user_id\path_to_folder\$(Platform)\$(Configuration)</IntermediateOutputPath>
Note that you need to replace your_user_id and path_to_folder in the line above with your own values specific to your Mac installation.
The best is to put the line in every platform and configuration.
You can actually put it somewhere other then Users folder, but that seems to be the best place to put.

XNA projects hosted in Dropbox fails to build due to incorrect file paths

I have an XNA project that's hosted and shared with another user via a Dropbox account. When I try to build, it fails with this error:
Unable to copy file "D:\Documents\Dropbox\Super Mario Limitless\SuperMarioLimitless\SuperMarioLimitless\bin\x86\Debug\Content\m_norm.xnb" to "bin\x86\Debug\m_norm.xnb". Could not find a part of the path 'D:\Documents\Dropbox\Super Mario Limitless\SuperMarioLimitless\SuperMarioLimitless\bin\x86\Debug\Content\m_norm.xnb'.
It seems to be trying to pull a file out of the other computer's path, which clearly doesn't exist on this computer. I've traced it down (roughly) to a file called ContentPipeline.xml in $(SolutionFolder)\SuperMarioLimitlessContent\obj\x86\Debug\
<Item>
<Source>m_norm.png</Source>
<Name>m_norm</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
<Options>None</Options>
<Output>D:\Documents\Dropbox\Super Mario Limitless\SuperMarioLimitless\SuperMarioLimitless\bin\x86\Debug\Content\m_norm.xnb</Output>
<Time>2012-12-06T21:47:30-05:00</Time>
</Item>
Now, I can change the paths to my own, and it will work for me but not for him. I tried changing them to relative paths, but it doesn't seem like whatever's loading this file will parse relative paths, nor does it work with $(SolutionFolder) or $(ProjectFolder), instead interpreting them literally.
The two content files in question are both set to "Build Action: Compile" and "Copy to Output Directory: Copy Always".
So, is there a way to fix this, or is this a sign of deeper problems?
Thanks in advance.

WiX can'f find my file : unable to load file, error LGHT0103

I am using WiX 3.5 and making an installer. I have used heat.exe to bundle all the files.
It produced a WiX file. I referred in main wxs files as componentgroup ref. When I build my installer, it throws the following exception.
light.exe : error LGHT0103 : The system cannot find the file
'..........\target\tmp-release\jboss-eap-5.0\jboss-as\server\all\deploy\httpha-invoker.sar\invoker.war\WEB-INF\classes\org\jboss\invocation\http\servlet\ReadOnlyAccessFilter.class'
with type ''.
It is able load many files from this location, except the above file, even though the file is present.
Looks like you've hit the linker bug. As far as I can see, it was already reported to the WiX team, and was scheduled for v4.0. The comment to the issue states the path is more than 255 characters, so a possible workaround for you is to re-work the files/folders layout to avoid the paths of that length.
Hope this helps.
The answer of Ravz1234 works ! I used it with a environment variable e.g. env.SourcePath.
1) Set an environment variable to show on your Source Dir e.g. C:\SourceDir
2) On heat.exe add the argument -var env.SourcePath along with the other arguments
I used the variable for the directory, sys.SOURCEFILEDIR, and it worked well.

How to pass an integration property to a batch file with CruiseControlNet?

In the build log of my project, i can see these properties:
<integrationProperties>
<CCNetProject>Gdet_T</CCNetProject>
...
<LastModificationDate>4/6/2010 1:29:04 PM</LastModificationDate>
<LastChangeNumber>10841</LastChangeNumber>
</integrationProperties>
I want to pass the property CCNetProject and LastChangeNumber to a batch file. it works well with CCNetProject, as it can be used in the batch as an environment variable %CCNetProject%.
But it doesn't work with other properties (those are not starting with the CCnet prefix) as LastChangeNumber or LastModificationDate.
I tried to pass it as argument, but it fails !
<exec>
<executable>$(WorkingFolderBase)\MyBatch.bat</executable>
<baseDirectory>$(WorkingFolderBase)\</baseDirectory>
<buildArgs>$(LastModificationDate)</buildArgs>
</exec>
I tried to pass it as environment variable, but it fails:
<exec>
<executable>$(WorkingFolderBase)\MyBatch.bat</executable>
<baseDirectory>$(WorkingFolderBase)\</baseDirectory>
<environment>
<variable>
<name>svn_label</name>
<value>"${LastModificationDate}"</value>
</variable>
</environment>
</exec>
The results is always the same when I display the parameter or variable : empty string or the variable name $(svn_label)
I'm sure it is simple, but ... I can't find ! Any idea ?
CCNET passes the following parameters to external programs:
CCNetArtifactDirectory
CCNetBuildCondition
CCNetBuildDate
CCNetBuildTime
CCNetFailureUsers
CCNetIntegrationStatus
CCNetLabel
CCNetLastIntegrationStatus
CCNetListenerFile
CCNetModifyingUsers
CCNetNumericLabel
CCNetProject
CCNetProjectUrl
CCNetRequestSource
CCNetUser
CCNetWorkingDirectory
As you can see LastIntegrationStatus e.g. is available through CCNetLastIntegrationStatus but LastModificationDate e.g. has no equivalent.
You can pass additional arguments via <buildArgs> or <environment> but inside CCNET configuration you have no access on the integration properties mentioned above. Most people starting with CCNET (including myself) try something like <buildArgs>$(CCNetProject)</buildArgs> and fail.
Have a look on my answer to a similar question.
Sorry I can't provide a better solution.
Update (regarding Thinker's suggestion):
Using $[$CCNetLabel] inside CCNET configuration does not seem to work.
Frankly spoken, I would have been rather surprised, if it had. The configuration is something static whereas CCNetLabel is something dynamic, that potentially changes with every integration build. Assuming you have access to these dynamic properties inside the configuration, the configuration might change with every build. Since changing the configuration means restarting the CCNET server automatically, you would cause a server restart with every build. Not actually a desirable behavior, is it?
ok, found the solution.
Need to use a specific label called SvnRevisionLabeller to retrieve the svn revision.
it is then available via the CCNetLabel environement variable.
http://code.google.com/p/svnrevisionlabeller/
<labeller type="svnRevisionLabeller">
<url>http://mysvnrootproject/trunk</url>
</labeller>

Resources