I use build on with the following chain to build several dotnet solution:
Jenkins -> batch (cmd) -> MsBuild
How to retrieve build result and failure on MsBuild compilation into jenkins and/or Rational team concert build result ?
I have found jenkins plugin to import trx files (tests results) of MSTest.
I expect to find some think equivalent for MSBuild but i don't want to have to define each solution into jenkins.
The warnings ng plugin will do it for you. Install the plugin and then use the following in your publish step :
recordIssues enabledForFailure: true, tools:[msBuild()]
https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md
The solution to see the MSBuild output in Jenkins is to install
MSBuild Plugin(https://wiki.jenkins.io/display/JENKINS/MSBuild+Plugin)
Then, you just need to create a call to it from your pipeline
bat "\"${tool 'MSBuild'}\" \"%WORKSPACE%\\Example.sln\" /t:Clean,Build /p:Configuration=Release /p:OutDir=\"%WORKSPACE%\\Example\\Example.sln\" /p:BuildingProject=true"
This will show the MSBuild process in the Jenkins console output.
Related
I am trying to have a CI/CD pipeline for my project for which the output of the development is multiple xaml files.
I am trying to build a pipeline in Azure Devops tool. For build pipelines we have to select a task (for eg: for powershell scripts there is a powershell task) . Since our project files are xamls , what could we select here and complete our build pipeline?
Basically what are the build activities(like sonarQube and HPFortify for java project) that we can do on xaml files ? If there is none, can I bypass and have an empty build so that we can enter the release pipeline without much build checks.
We dont need to package it into a separate package. It can remain as xaml files after the build and the CD pipelines can deploy it to a folder in the server.
If your build artifact is just a bunch of XAML files then simply use a copy task to copy these to $(Build. ArtifactStagingDirectory) and then use a publish drop task to take the contents of $(Build. ArtifactStagingDirectory) and store it on the server and you're done.
You don't have to have a build task you just need the files required for your release which the above couple of steps will do nicely.
For example, project A generates two artifacts processor.exe and t.txt. Then in project B, can I add a build step to execute processor.exe t.txt?
I know there are two Runner types(.NET Process Runner and Command Line) that can execute programs. But how to get the paths of these artifacts?
Yes, I think it should be possible to run with Command Line runner *.exe file generated by other build.
You just have to make sure that build agent which runs Project A outputs these artifacts to place where build agent which runs Project B has access (in case if you have single agent it's not a concern obviously). And probably placing these artifacts into agent's working directory is not the best place because it can be cleared by doing clean checkout from VCS. Just choose some generic directory on the server and specify it for artifact output in Project A and then for Command Line runner in Project B.
I have some jobs maje with Talend Open Studio and I want use maven to export jobs in zip file to do automatic build.
Can I found an existing maven plugin to do that?
Can I build job with command line ?
Talend CommandLine is only available in Talend Enterprise Subscription Version. There is no job script in Talend open studio products.
For more information about how to use command line to build the job, please visit this link.
It's possible but complex !
You will have to change pom settings.
Change the file maven_user_setting.xml and settings.xml
Check Offline in maven preferences.
Then with command line like following you can build your project :
mvn -B -s C:\Talend\TOS_DI-Win32-20200219_1130-V7.3.1\configuration\maven_user_settings.xml install -l C:/Talend/lastGenerated.log -P default-settings,!include-java-sources,!include-maven-resources,!include-items,include-libs,!include-binaries,include-running-log4j,include-log4j,include-contexts,!include-test-sources,!include-test-reports,include-xmlMappings,include-running-xmlMappings,packaging-and-assembly,!ci-builder -Dmaven.test.skip=true -Dci.builder.skip=true
I use a very basic Custom Script in TeamCity 7.0.3 which uses Visual Studio 2010 to build a solution and its installers.
The build was failing and the only relevant error in the TeamCity Build Log is
[13:17:13]Process exited with code 1
When I run the same script from the console, I get a lot of helpful errors about why the build failed.
How can I get TeamCity to include the errors from devenv.exe?
You need to report back the additional info to TeamCity in a way it can interpret.
Look at this article to see how to do it:
http://confluence.jetbrains.net/display/TCD7/Build+Script+Interaction+with+TeamCity
For a basic example:
You can report messages for build log in the following way:
##teamcity[message text='<message text>' errorDetails='<error details>' status='<status value>']
I am trying out TeamCity for our CI.
We have a build step running NUnit for unit test and dotCover for code coverage. The process went through fine, but im just wondering if it is possible to export the Build Log and the dotCover's CoverageReport.xml to a predefined directory on the local machine.
or maybe even export all the artifacts and reports used in the build to a local folder.
Just add a build step ( command line ) that will copy over the reports that you need to the desired location locally.