Jenkins publishing code for .net MVC solution in Ubuntu machine

We have installed the jenkins CI build environment in the Ubuntu database for .net.

Below are the steps performed in jenkins, and, as it turned out, work fine: - Get the base code repository from git. - Create a code base using "XBuild". Assembly is also possible in Release mode.

Post build, the problem we are facing is publishing the build code. We can follow the above steps, build using MSBuild and publish to Windows. But in Ubuntu we cannot publish (locally or externally), because the command line parameters (in the shell window) for publishing '/p:proj_file_pub.xml' do not work with the Ubuntu XBuild assembly.

We also have a mono tool installed in Ubuntu for manually building .net code .net. If we can publish using mono with any shell command, then please let us know.

I would reiterate the requirement to create .net code in Jenkins and publish to a local or external server. First, we want to publish the code locally.

Please suggest the appropriate shell command to publish the codebase on an Ubuntu machine using Jenkins.

PS: Code Base is an MVC web application.

0
source share
1 answer

Success!!!.

After many studies, it turned out that the team to publish a site locally using xbuild in ubuntu has the following command ...

xbuild./sandbox/sandbox.csproj/t: Build / p: OutputPath = "/ var / code / build" / p: Configuration = "Release"

An important parameter to note when publishing to the above command is / p: OutputPath. We need to set the appropriate path for "OutputPath" to publish it accordingly.

The published website will be under a name like / var / code / build / website / Publish _Website (not sure about the actual path).

You can use the same command with Jenkins as a shell command to publish a CI assembly to a site.

We hope this information helps.

+2
source

All Articles