I'm new to .net application (non-web application) project and using jenkins for continuous build and release. I completed creating builds for my project and got the .exe and dll files. But i need to repackage it(create a msi) before deploying to servers. So can anyone give a stepwise information for rePackaging and tool to be used with jenkins for packaging. I want to automate this process in jenkins CI AND CD.
Jenkins is not capable to pack any applications directly.
It will always use an external tool via a plugin or installed by you.
In MSI case, you need an windows agent with an app that will receive the command in command line and produce your deliverable.
Applications:
Installshield (very old - paid)
visual studio (paid)
TFS (on premises or cloud) (paid)
MSIX (? I don't know much about it)
WIX (free)
Jenkins plugin here
Related
I am currently working on a project (CI) on Jenkins. I have to integrate the automatic deployment of my Visual Studio solution which contain Crm Plugin and CrmPackage.
In order to make the deployment automatic, i have a Jenkins Jobs which execute the task :
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
Devenv CrmPackage\CrmPackage.sln /Clean
Devenv CrmPackage\CrmPackage.sln /Build Release
Devenv CrmPackage\CrmPackage.sln /Deploy Release
As my solution is not yet connect to CRM server, i have the error for deploy:
"The connection to the Dynamics CRM Server is unavailable.Error: The connection to the Dynamics CRM Server is unavailable."
I can connect and deploy manually with visual studio but i don't know how can i connect the server by command line with vstudio.I am a newbie in Crm deploy and my question is how to connect the Crm server by command line with vstudio.
how to connect the Crm server by command line with vstudio
Check out the xrm-ci-framework. Though it's targeted as being used for CI in VSTS rather than Jenkins, it contains a PowerShell script that can be used to connect to CRM via a connection string, and deploy a package.
You might also consider the spkl task runner for deploying your plugins separately. Spkl is a nuget package that allows you to decorate your plugins and have them automatically compiled and imported into CRM along with their plugin steps by running a .bat file manually, or from your CI build.
I'm new to using jenkins.I am working on C# project and using jenkins for continuous build and release. I completed creating builds for my project and got the .exe and dll files. But i need to repackage it(create a msi) before deploying to servers. So can anyone give a stepwise information for rePackaging and tool to be used with jenkins for packaging. I want to automate this process in jenkins CI AND CD.
Repackaging implies you have a third party installer that you want to reverse engineer into a new/better MSI. You are just packaging not repackaging.
This is a two part question:
Author an MSI. I recommend using WiX and IsWiX starting with this tutorial.
Build it using Jenkins. WiX supports MSBuild and Jenkins has a MSBuild PlugIn. Standard stuff except not that the .WIXPROJ created by IsWiX templates expects you to pass the MSBuild Property MSIProductVersion. The correct format for this property is 0-255.0-255.0-65535. You can tack on a fourth field if you would like but it will be ignored. The IsWiX project templates are set up for Major Upgrades by default so make sure one of these 3 fields is incremeented with each release. ( 1.0.0, 1.0.1, 1.1.0, 1.1.1, 2.0.0 )
This is more of a packaging issue than a Jenkins issue.
Take a look at WIX Toolset. I used it successfully in the past with various projects. Integration with Jenkins should be easy. There are 2 options I'm aware of:
After installing the WIX toolset, add a new WIX project to your Visual Studio solution. Once configured, commit the new project to your source code repository. Then developers can build .MSI packages on their own development workstation. Assuming you use MSBuild in Jenkins to build your C# project, the new project will "just build" and create .MSI package (remember to install WIX on your Jenkins build server). This is the recommended option.
Use WIX's command line utilities to generate MSI in a Jenkins batch step. This is more cumbersome and difficult to debug.
I am very new to Jenkins and sort of new to build .net application, but the guy left team so I have been assigned to do this. I have read tons of articles online about setting up Jenkins master, but little about slave configuration. The guy created a new slave and connect with Jenkins master successfully before he left. And he told me that slave is responsible for 1) downloading source code from TFS server and 2) building them.
now my issue is what do I need to install in the slave machine( windows system) to be able to perform that two tasks?
1) for downloading source code, do I need to install TFS client on slave ?
2) for building source code, do I need to install MSbuild or entire Visual studio ?
Thank you very much !
Assuming you installed a recent version of the Team Foundation Server Plugin, then no TFS Client is required (see https://github.com/jenkinsci/tfs-plugin#400-and-later-new).
Depending on what you are building, installing Visual Studio maybe required or not. In my experience, only a limited set of project types build with just MSBuild and without Visual Studio. There are hacks or supported tips but they work only in specific cases: YMMV.
The new Build Tools for Visual Studio 2017 RC are making this requirement a thing of the past: if you can migrate your code to Visual Studio 2017 you will be able to use them.
I am developing a Sitecore solution locally using TDS. Our source control and build server is Visual Studio Team Services (in the cloud). I would like to figure out a way to implement Continuous Integration and get builds to be automatically installed on an Integration server that is an Amazon VM (or it could be some other externally located server). I have the TDS build configuration set up to create a Sitecore Update Package. The build process works great. At the end of the build process I have the Sitecore Update Package sitting in a Drops folder in source control (TFS in the cloud). Now I can't figure out how to automate the process of getting that update package out of source control and downloading it to the Integration server and running the Sitecore command to install it.
In a perfect world you would use something along the lines of a fancy Microsoft Release Management to deploy it to the environment of choice. However, if you are like the majority of us mere mortals without the fancy tools - this should help: https://github.com/adoprog/Sitecore-Deployment-Helpers
With these pages you could just send a get request from TFS or use the logic to write a custom PowerShell post-build script. Hope this helps!
As you are using TFS you get to use Release Management for Visual Studio out of the box. This is a simple install but at this time is separate. I have an instance of RM running in a VM and attached to my VSO instance for running deployments.
I would expect this tool, which was bought by MS last year, would become more integrated in vNext.
I'm trying to get our TFS server to build a solution with an azure project. To get up to speed fast, I installed the azure SDK 1.6 on the build server/agent. I only needs to build and not publish the project for the moment. But I get the error below.
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.6\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Both the development machine and the build agent is x64, but on the development machine the azure stuff was installed in to "programfiles (x86).
Now I really need an advice on how to get the build agent to build the project, do I really need to include some dll's in the project, or how do I best fix this?
Up and running. A quick and dirty installation of the azure sdk and azure tools for visual studio did the trick.