Hi,
I have implemented Continua CI support in GitVersion and it looks like I found a possible bug. I have been using it successfully on several projects, but it doesn’t work for a specific one. Luckily everything is public so you can easily test it.
1) Create a new configuration with this repository: https://github.com/catel/catel.fody => Catel_Fody
2) Create an action with the following properties:
Executable path: $Source.Catel_Fody.Path$\tools\GitVersion\GitVersion.exe
Working directory: $Source.Catel_Fody.Path$
Arguments: /url $Source.Catel_Fody.Url$ /b $Source.Catel_Fody.Path$ /output buildserver
What happens is that the version is correctly set to (in my case 1.9.0-Unstable2). This is the output:
Executing GenerateSetVersionMessage for ‘ContinuaCi’.
Program ‘GitVersion.exe’ completed successfully.
I did expect something like this though (which works great on other projects):
Executing GenerateSetVersionMessage for ‘ContinuaCi’.
Build version has been set to ‘1.3.0-Unstable5’.
Executing GenerateBuildLogOutput for ‘ContinuaCi’.
An unexpected error occurred: Could not resolve variable ‘gitversion_major’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_minor’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_patch’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_suffix’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_longversion’ as it does not exist.
Variable ‘%gitversion_nugetversion%’ has been set to ‘1.3.0-Unstable0005’.
An unexpected error occurred: Could not resolve variable ‘gitversion_shortversion’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_branchname’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_branchtype’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_sha’ as it does not exist.
Variable ‘%gitversion_majorminorpatch%’ has been set to ‘1.3.0’.
An unexpected error occurred: Could not resolve variable ‘gitversion_semver’ as it does not exist.
Variable ‘%gitversion_version%’ has been set to ‘1.3.0-Unstable5’.
An unexpected error occurred: Could not resolve variable ‘gitversion_prereleasepartone’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_prereleasenumber’ as it does not exist.
An unexpected error occurred: Could not resolve variable ‘gitversion_stability’ as it does not exist.
Program ‘GitVersion.exe’ completed successfully.
I am sure that GitVersion.exe works correctly because I have ran it without Continua CI, then it works great.
I think something goes wrong when parsing this value:
@@continua[setBuildVersion value=‘1.9.0-Unstable2’]
Note that the version of the build is changed, but that the output of the process has stopped after this.
I think the problem is this :
Arguments: /url $Source.Catel_Fody.Url$ /b $Source.Catel_Fody.Path$ /output buildserver
it should be: /url $Source.Catel_Fody.Url$ /b $Source.Catel_Fody.Branch$ /output buildserver
The branch parameter was wrong.
I am sorry, it was my mistake (in the post). If it would have been the path, it wouldn’t have event returned any value. The log of the file being executed is correct:
Working Directory: C:\CI_WS\Ws\1239\Source\Catel_Fody
Executable: C:\CI_WS\Ws\1239\Source\Catel_Fody\tools\GitVersion\GitVersion.exe
Arguments: /url https://github.com/Catel/Catel.Fody /b develop /output buildserver
Hmmm, on a new configuration it works.
No, it seems to be a synchronization issue. See the output where I put 2 exactly the same executables after eachother:
[Attachment unavailable]
Hi Geert
Thanks, I can reproduce this. It appears to be an issue with logging, the action is working fine. We’ll look into it.
Hi Geert,
The process messages were being picked up after the process ends. We have now implemented several improvements to the Continua process runner to deal with this issue. You can download a new build here:
ContinuaCI Server v1.0.0.3054
ContinuaCI Agent v1.0.0.3054
Fix seems to work
Hi Geert,
Apologies, but the last build omits newline characters from the process output and this didn't come up in our testing.
Please install the following fix: