Dynamics CRM Visual Studio Jenkins - jenkins

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.

Related

How to .exe file to msi via jenkins

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

BEA Weblogic workspace configuring in jenkins

Regarding CI and CD.
As of now the manual approach followed by developers is the developers are using bea workspace studio for their builds and these builds are sent to Ops team to deploy the ear files in the backend. Workspace studio contains .metadata wherein .plugins will be created while using the workspace. As part of the DevOps implementation we need to build that in their onpremise build server which is sun solaris. The server has weblogic but not workspace studio. Is there any alternate approach to build in the build server apart from using workspace studio.

Visual Studio Team Services clone command

Im trying to find command for TFS like clone/checkout for GIT. I have regular TFVC version control system, NOT the Git. I have project on TFS and intranet server on which the my application works (it is php app no compilation is needed, only copy is required). I need to deploy changed files from TFS to intranet server. When i was using Git i only need to checkout changed files to server.
Is there any similar option how to do this on Visual Studio Team Services. I don't want to use deploy option in tfs. It is not possible to allow Visual Studio Team Services to access my intranet server (im looking for different way how to copy data on intranet server form TFS). And also i dont want to have full Visual Studio on my intranet server. Is there any option how to deploy changes from TFS to intranet server?
If you are using Visual Studio Team Services, you could try the Xcopy command.
Include xcopy command in script, then add script into tfs git build process.
How to run script in your build process:
https://msdn.microsoft.com/en-us/library/dn376353(v=vs.120).aspx

How do I deploy my nuget package with Octopus Deploy and TFS 2013?

I am attempting to fully automate the deployment of a simple assembly onto two application servers (which have the Tentacle services installed), and I'm running into a few challenges.
What I have achieved:
I can create a NuGet package with /p:RunOctoPack=true.
I can manually upload (publish?) the package to my built-in feed on the Octopus Deploy server.
I can deploy the packages to both my application servers using the Octopus Deploy portal.
I can infer from the post (OctopusPublishPackageToHttp in TFS Service) that I should be able simply put all of the following on the Process/Build/Advanced/MSBuild Arguments box
/p:RunOctoPack=true
/p:OctopusPublishPackageToHttp=http://octoserver:8081/nuget/packages
/p:OctopusPublishApiKey=API-MYKEY.
However my builds are returning the error
Exception Message: Access to the path 'C:\Builds\1\Experiments\CIBuildDef\bin\ConsoleTibcoMefClient1.1.0.0.0.nupkg' is denied.
(type UnauthorizedAccessException)
With this assembly (a simple .NET Class Library). The builds are all being dropped into the same path (C:\Builds\1\Experiments\CIBuildDef\bin). I'm accustomed to a new folder being created by the build every time. I must be missing something in the build definition settings. Am I getting this error because I'm not changing the version number of the package yet? I cannot seem to delete the nupkg that was originally dropped in the Builds directory, even after deleting it from the feed.
How do put my NuGet package onto the feed with TFS?
How do run my Octopus Deploy steps from TFS?
Am I asking the right questions?
Thanks for any input you can provide.
Could you ping your octopus server from tfs build server? And could you telnet to 8081 port from your tfs build server? If you could, you should rebuild the project not build for the same repository. If the new nuget version is not higher than 1.0.0.0 octopack could fail. You must increment the nuget version from your tfs build template. The following commands must be work for you. This commands are for msdeploy deployment with powershell. If you want to use msdeploy you must install it to tentacles. I am using it for web project deployment.
Command line arguments:
/t:Rebuild /p:AutoParameterizationWebConfigConnectionStrings=False
/p:DebugSymbols=false /p:DebugType=None /p:IsAutoBuild=True
/p:CreatePackageOnPublish=true /p:Configuration=Release;DeployOnBuild=True;PackageLocation=".\obj\Release\Myproject.zip";PackageAsSingleFile=True /p:RunOctoPack=true
/p:OctoPackPackageVersion=%VERSION%-dev
/p:OctoPackPublishPackageToHttp=http://octopus.yourdomain.com/nuget/packages /p:OctoPackPublishApiKey=API-xxxxxxxxxxxxx

Azure on TFS 2010 best practics

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.

Resources