Msbuild running in Jenkins target calling HgPull fails with HgProcessException: The command <hg.exe> is not available - mercurial

I am porting over an MSBuild script from CCnet to run in Jenkins. The MSBuild project is used to create a deployment package. I would rather have Jenkins drive this process itself but that's a longer term aim.
The problem i am having is (as in the title) when we try and use the HgPull target, from the MSBuild mecurial task (http://msbuildhg.codeplex.com/) we get the error message
HgProcessException: The command hg.exe is not available [Path to project]
I have seen on the project web site that someone solved it by adding the LibraryLocation proeprty to the target but that seems to have made no difference. My target currently looks like this:
Target Name="UpdateSources">
<HgPull
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Force="true"
Update="true"
LocalPath="$(SourcePath)"
/>
<HgUpdate
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Clean="true"
LocalPath="$(SourcePath)"
/>
I'm rather at a loss. Please let me know if you need any more information added to this post to solve this issue. I'm really quite new to MSBuild so really not sure where to start investigating this.
EDIT:
One thing i forgot to mention was that i have tried running the MSbuild command in a console window on the build server and still get the same result. This is really odd given it works fine in CCNet, what magic is CCNet doing to make this command work?

This is now resolved, unfortunately i'm not sure what changes i made to correct these. I believe it may have been down to path separators and whether they where trailing or not in another part of the config file. It does so annoy me with the lack of resilience/consistency between applications where you need to specify paths with/without trailing slashes.

Just a thought, but try adding 'C:\Program Files\TortoiseHg' to your system path. Maybe CCNet has it specified somewhere that Jenkins doesn't have access to.
Also, just for sanity's sake, verify that hg.exe actually exists at that location.

Related

How do I build a specific dtproj file within a solution?

I have a solution full of SSIS projects, and I'm trying to build a single one via command line. I know I need to use the devenv.com executable, and if I use devenv.com solution.sln /Rebuild it will process the whole set of projects. However, I cannot seem to get the additional parameters correct. When I try devenv.com solution.sln /Rebuild "Development" /Project "projname", I get an enigmatic The operation could not be completed. The parameter is incorrect. Which parameter? What should it be? I've tried replicating this answer's syntax, but I get the same error. How do I find out what parameter is incorrect? So far the closest I can get is to rename the .sln file so it can't be found and just specify the .dtproj file.

Pass variable into run/debug configuration arguments

I've done a fair old bit of searching, so asking here as a last resort!
I know under "File Watchers" there are variables/macros that can be passed into the arguments field like $FileName$
Can this be done with Run/Debug configurations? I've tested with the variables/macros available from File Watchers, but they just get passed directly through to my gulpfile.
If not possible, an alternate approach - is it possible to read the path that a watcher (gulp-watch) has been trigger from?
Many thanks in advance,
No, it's not possible. Generic support for using macros in run configurations was added in 2018.3 (see IDEA-74031), but it has to be implemented separately for each configuration/field. Please feel free to file a request for adding variables support to Gulp run configuration to youtrack, https://youtrack.jetbrains.com/issues/WEB

How to setup limeJS in a totally offline workspace

I'm trying to setup limeJS, the issue is the Internet connection is a problem. I had closure library, box2d, closure compiler and closure templates downloaded separately as .rar files, but I can't find a guide anywhere to set it up like this, everyone just uses(and with reason!!!) the python bin/lime.py init command to get it working. I managed to figure out(yay!) how to setup box2d and closure library but what about the other two?
My laptop is running 64 bits Windows 7. Any help appreciated
All I need is an advice on directory structure, like where to drop the compiler.jar and soy templates .js files, so that when I run the update/create command it doesn't try to download the compiler or templates like it does right now.
I got it working, after taking a quick look at the lime.py file it told me everything I needed, for example both the SoyJs templates file and the compiler need to be in the /path/to/lime/bin/external folder and for example, the lime.py file was expecting a compiler file named compiler-dateOfLatestCompiler.jar instead of compiler.jar.
In general, If you have LimeJS built up in one machine using Python and all, you can just copy paste the whole package anywhere you want and use it just as ususal.
You don't need network once you have all the files/codes for Lime is downloaded.
Infact, you dont even need python for normal development tasks(Python is required to build your js file once you complete development though)

SQL Server Agent Adding a Parameter for a CmdExec

I want to add a parameter to a step that runs an operating system (CmdExec) in SQL Server Agent. I have searched everywhere and asked my coworkers and none of them had tried it before. I have attached a picture of the screen. I was thinking that I might be able to add the parameter (file path) after the .exe statement, but wasn't sure.
I thought the following might work:
Executable Path Parameter Path
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
This is on a production server and I didn't want to break anything if this isn't correct.
Thanks!
Yes You can use parameters, so your command would be:
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
If there is a space in the name don't forget to use quotes as specified in tip in screenshot:
"C:\My Program\MyApp.exe" "E:\App Info\Client\Config.txt"
Since You want to try it on production server, consider testing your configuration and software on test environment first. If You doubt that this will work, You can set job to execute only this single step to make sure it will work as expected.

Configuring xUnit for CUnit in Hudson CI

I want to use Hudson CI for my c-project, which also uses CUnit. However I've also come to understand that there is currently no plugin that supports CUnit. So I read on the internets that this might be possible using the xUnit plugin by translating between CUnit and JUnit, but using the supplied file yields an error.
[xUnit] [ERROR] - The plugin hasn't been performed correctly: Conversion error Error to convert the input XML document
So my question is; has anyone successfully run CUnit tests in hudson. And, in that case, how?
#Nubsis: Did you by any chance copy & paste from the listing? The downloadable file seems to work just fine.
If you found errors in it let me know so I can fix them and put an updated version on my blog so others don't run into the same problems you had.
As it turns out, there were some syntax errors in the xslt-file provided in the link. After correcting this and some identifiers it worked out well.