New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration to Jenkins/build automation server #7
Comments
Awesome repository! Came here looking for this so just putting a ⬆️. Would love to have an out of the box solution to run on Appveyor. |
Great initiative. A bit offtopic, but I was wondering if there is a simple way to just invoke msbuild to build the tcproj on the buildserver, and encode multiple configurations to include / exclude the unit tests. Think a Jenkins builder that can be trigger a compilation to produce the build artifacts, and another compilation to create the binaries with unit tests, to be run later on. |
@edgargrimberg I tried and failed to get msbuild to work, but have made some progress with
Devenv unfortunately runs in the background - returning immediately after you type the command - but eventually the build results will show up in |
@klauer Maybe this can help for blocking until it ends: |
Thank you @sagatowski, I could able to build a job in Jenkins as you explained in the series: https://bit.ly/2Y0TBIJ As the next task, i am trying to add unit testing using TcUnit to Jenkins.
Results of the unit testing appears on the error list window of VS2013 project(VS2013 was invoked by the C#):
Using I tried other approach to see if thing will work out. I wore the code as below, ErrorMessage.Length returns always 0
Is there any way to capture these messages on display on to the console. |
@u-hafner - thanks! I can confirm that both of the following work, though With Using |
Thank you @sagatowski |
See also Export results in Xunit XML format #11 |
I think this issue is now solved |
Not yet. For TcUnit, the documented way will be handled by the TcUnit-Runner, which is not yet released. The software is done, but the documentation is not yet finished - and don't want to release one without the other :-) |
Looking forward to see your C# TcUnit-Runner in action! It must be great to finally run true CI/CD scenario's using it (allthough from CODESYS point of view it has little added value as that has (iron) python-power under the hood) Never the less a breakthrough for TwinCAT related software! |
I'm looking forward to it as well. It's just been so much more challenging than I could ever have imagined. So many use cases to consider. Right now it's at least in such a state that it's ready to receive feedback. I can imagine much of this is already in place for vanilla codesys. |
The feedback will help it get mature more quick, so that is a very good thing.
Also, borrow ideas from the Python CODESYS API and the CODESYS.exe arguments.
If you at least read up on them, you get an idea of what neat stuff you could add and fill in those gaps.
I’ll follow the TcUnit-Runner with great interest.
|
Do you have a link to the documentation of this API? |
Good starting point; CODESYS Python scripting API; CODESYS Commandline Interface, maybe TwinCAT has support for this too? |
@edgargrimberg Its not possible with MsBuild, because plc projects are build with CodeSYS compiler. See here. |
Finally implemented. To state this was a major task would be an understatement. |
Today it's only possible to run the tests locally on a developer/engineering machine. In large projects this is usually not optimal, as the amount of source code can be overwhelmingly large.
In the sphere of continous integration and continous delivery there needs to be a more automated way to run the tests. One solution/suggestion is to write a program/script that automatically runs the tests on the build-server using a combination of the Microsoft Visual Studio development tools environment plus the TwinCAT automation interface.
The text was updated successfully, but these errors were encountered: