I have a build definition on visual studio online which creates an msi installation package using WiX.
How can I automatically deploy the msi package from VSO build agent to Azure VM after the build completes successfully?
Note: I prefer to use a post-build batch or powershell script as part of the build process. The script should copy the msi to the vm and install it.
You should use Release Management Online. It comes with VSO and allows you to easily orchestrate installing an MSI on any Azure server.
http://nakedalm.com/building-release-pipeline-release-management-visual-studio-2013/
Microsoft just added RM in VSO and its simple to use. I setup an end to end web app deployment, buy as its just a PowerShell to do the install an MSI would be trivial. RM takes care of getting all of the bits to the right spot...
http://nakedalm.com/create-release-management-pipeline-professional-developers/
Honestly, it sounds hard, but is much easier than trying to do it all yourself.
Related
I am creating an MSI installer with Wix and wrote a task in the azure DevOps pipeline which builds the MSI solution file using MSBuild. When the code is pushed to remote the pipeline runs the task but my task returns the error saying WiX toolset is not installed hence the build fails. Though it is assured that the MSBuild task works as it is building other projects in the solution.
##[error]Process 'MSBuild.exe' exited with code '1'.
##[error][Path to wixproj](44,5): Error : The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/
Is there any way to install Wix toolset using pipeline?
Or any workaround which might help?
Please note that I am using a custom job pool if that might be a cause for this issue.
Check this article from the official wix documentation.
Most likely, the issue is that your .wixproj is out of date and thus does not handle the breaking changes made in MSBuild 2017. You can re-create your .wixproj using the latest templates in Visual Studio or walk through the steps laid out here.
Essentially, you need to update the way that MSBuild imports the wix.targets because MSBuild 2017 changed the way they did that.
I have a VSTF build server which we use to build and deploy our applications mostly C#. I have now been challenged with deploying SSIS packages. From a manual perspective on my laptop we can get things accomplished, but on the build server we are having issues. This has been our guide, but it was written in 2017. https://www.red-gate.com/simple-talk/sql/ssis/deployment-automation-for-sql-server-integration-services-ssis/
We are on VSTF2019, VS2019. On the build server we use only the MSBuild tools, but it seems like SSIS on the build server wants the full UI for VS2019 and SQL Server Management Studio and SSIS.
Our issue is our C-Drive has insufficient space to support these UI's and they don't fully allow us to deploy them to the D-Drive where we have more then enough space.
I am looking for a document or how-to add SSIS (2019) to our build server so that it can be built and deployed using the least amount of space on the c-drive, like build tools. or does SSIS need a build server of its own?
You can use SSDT standalone installer to install Integration Services without a SQL server. See document here for more information.
does SSIS need a build server of its own?
Building SSIS package needs the required tools(VS2019+SSIS) to be installed in the build server. If this is achievable. You can just install the tools in your existing build server.
Or you can just create on-premise build agent on a new build server which has the tools installed.
If you are able to have a build server with Visual Studio and SSIS designer installed. Deploying SSIS packages would be much easier. You can use the SSIS Build/Deploy task directly in your pipeline. See document here.
I have a VS2019 project that code signs using Windows 10 Kit's SignTool.exe, and builds an installer using Inno Setup. This is part of the projects PostBuildEvent. How would I do this properly in a hosted DevOps Build pipeline?
The project file's PostBuildEvent is below:
<PropertyGroup>
<PostBuildEvent>
if "$(ConfigurationName)" == "Release" "$(ProgramFiles)\Windows Kits\10\bin\x64\SignTool.exe" sign /n "SomeCompanyName" /tr http://timestamp.comodoca.com/authenticode /td SHA256 $(TargetDir)Test1.*.dll $(TargetDir)Test1.exe
if "$(ConfigurationName)" == "Release" "%25ProgramFiles(x86)%25\Inno Setup 5\iscc.exe" "$(SolutionDir)Setup\Setup.iss"
</PostBuildEvent>
</PropertyGroup>
I have a DevOps build pipeline that is using a "Hosted Windows 2019 with VS2019" agent pool, it has "Microsoft.VisualStudio.Component.Windows10SDK.17763".
I could create a command line task to invoke the SignTool.exe using an updated path. How do I handle the Inno setup installer?
How do I handle the Inno setup installer?
You could install Inno Setup via Chocolatey during building on hosted agent.
The VS2019 image has Chocolatey 0.10.11 installed on it, this should a good way to install tools during a build if you can find your tool as a package there.
Besides, Inno Setup does support being installed via Chocolatey. You can see that on the packages page here. That green bulb at the top of the page is an indication that this package version correctly installed via the automated processes that Chocolatey has, verifying that a package installed correctly.
You can check the ticket Add Inno Setup to Visual Studio 2017 Images on Github for some more details.
Hope this helps.
We create Sitecore .update packages using TDS and Visual Studio. The update packages can be installed using /sitecore/admin/updateinstallationwizard.aspx. Is there a way to install these packages using Powershell?
Thanks
It depends on the tooling you want to use.
If you can work with Sitecore PowerShell Extensions, it has a convenient Install-UpdatePackage cmdlet (not the Install-Package - this one works with regular Sitecore packages exclusively) that can deploy them in your environment. You can read more about it in our GitBook
You can also create those using the Get-UpdatePackageDiff and Export-UpdatePackage if you do not have access to TDS.
Now to do this on the server directly that's just something that you would run from the Web UI using SPE ISE, but to upload those from your dev environment you can utilise the SPE Remoting again as described in this Gitbook page
If you don't have or want to have SPE deployed on your server you can utilise Sitecore Ship and automate that in Windows PowerShell without the use of Sitecore PowerShell Extensions. The functionality of Sitecore Ship module is limited to doing the task of deploying Sitecore Update packages but this might be just what you want.
You can use for Sitecore Powershell command:
Install-Package [[-Path] ] [-InstallMode ] [-MergeMode ]
More details can be found here:
https://sitecorepowershell.gitbooks.io/sitecore-powershell-extensions/content/appendix/commands/Install-Package.html
Can you please enlighten me on my task?
My task is to create a nightly builds of MSI (done in WiX) and install it to our web server using powershell.
TFSBuild server build an MSI
Run Powershell to uninstall and install the newly build MSI.
Run Powershell to Start the windows service.
The WiX MSI contains WindowsService and a Web Application.
Below are list of what i have done so far:
Solution.sln : Configuration Manager and "x86|debug" (check all the files that needs to be built '.wixproj' already checked)
Created a build definition and set "x86|debug" for configurations to build and set projects to build is my solution file.
but after the build has completed, there is no MSI files on the binaries build folder on the build server. :(
Thanks in advance.
Few pointers:
Have you installed Wix on the buildserver?
Which version of Team Build are you using? 2010 has the preference here as the tooling has progressed a lot since 2008.
Did you configure to run msbuild in auto or x86 mode (auto can result in 64-bit which has some issues with the latest stable version of wix) link link
Is your build agent running on a 64 bit server? If so, you either need to run the build agent under an administrative account or do some mucking around in the registry to fix issues with Wix. link
To install the build using Powershell, I personally prefer TFSDeployer, which can monitor your build output and trigger powershell scripts based on the build outcome. It takes away the deployment responsibility from the build server and saves a lot of headaches around security and account configurations.