BizTalk Server 2016 Azure DevOps CI/CD Pipeline using BTDF

%3CLINGO-SUB%20id%3D%22lingo-sub-1563773%22%20slang%3D%22en-US%22%3EBizTalk%20Server%202016%20Azure%20DevOps%20CI%2FCD%20Pipeline%20using%20BTDF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1563773%22%20slang%3D%22en-US%22%3E%3CP%3EBTDF%20(BizTalk%20Deployment%20Framework)%20is%20actually%20an%20msbuild%20project%20with%20custom%20msbuild%20tasks.%20It%20can%20be%20customizable%20according%20to%20customer%20BizTalk%20project%20needs%20and%20it%20is%20extensible.%20BizTalk%20CI%2FCD%20pipeline%20can%20be%20implemented%20not%20only%20using%20TFS%2FAzure%20DevOps%20but%20also%20other%20DevOps%20tools%20like%20Jenkins%2C%20etc%E2%80%A6%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%2C%20BTDF%20is%20installed%20to%20BizTalk%20machines%20on%20Complete%20mode.%26nbsp%3BThen%20.btdfproj%20file%20is%20added%20to%20the%20solution.%20This%20file%20will%20be%20run%20in%20powershell%20script%20while%20deploying%20the%20dll.%20And%20this%20file%20can%20be%20extensible%20using%20tags%20for%20orchestrations%2C%20maps%2C%20bindings%2C%20etc..%20(Capture1)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%2C%20CI%20process%20is%20prepared%20on%20Azure%20DevOps.%20The%20dlls%2C%20powershell%20scripts%20for%20running%20the%20btdf%20commands%20for%20deployment%20and%20.btdfproj%20file%20are%20packaged%20to%20DROP%20folder%20and%20published.%20(Capture1)%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorbusrab_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EPackaged%20build%20artifacts%20include%20dlls%2C%20deployment.project%2C%20custom%20powershells%20etc.%20(Capture2)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20publishing%2C%20CD%20process%20is%20prepared%20for%20all%20environments.%20(Capture2)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20build%20tags%20are%20used%20to%20know%20on%20which%20environment%20we%20will%20deploy%20the%20projects.%26nbsp%3B(Capture3)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EInside%20the%20boxes%2C%20there%20is%20a%20task%20for%20copying%20packaged%20files%20to%20BizTalk%20machines.%20(Capture4)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20Running%20powershell%20commands%20in%20BizTalk%20machines%20task.%20(Capture4)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EInside%20the%20deployment%20powershell%20script%20(DeployProject.ps1)%2C%20you%20can%20see%20msbuild%20command%20which%20runs%20the%20btdfproj%20file%20(Capture5)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESame%20msbuild%20command%20used%20while%20deploying%20using%20Visual%20Studio%20BTDF%20toolbox.%20After%20deployment%2C%20the%20BizTalk%20services%20and%20IIS%20is%20restarted%20with%20powershell%20script%20(PostBuild.ps1)%20also.%20(Capture5)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20sum%20up%2C%20copy%20Build%20artifacts%20(dll%2C%20Deployment.btdfproj%2C%20*.ps1%2C%20etc)%20to%20BizTalk%20servers%20on%20your%20CD%20pipeline%20and%20run%20below%20command%3A%3CBR%20%2F%3E%3CBR%20%2F%3EMSBuild.exe%20%22C%3A%5CDevel%5CHelloWorld%5CHelloWorld.Deployment%5CHelloWorld.Deployment.btdfproj%22%20%2Fnologo%20%2Ft%3ADeploy%20%2Fp%3AConfiguration%3DDebug%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EIf%20you%20don%E2%80%99%20t%20want%20to%20use%20BTDF%3C%2FU%3E%3C%2FSTRONG%3E%2C%20you%20can%20write%20your%20own%20deployment%20powershell%20scripts%20and%20run%20them%20in%20BizTalk%20machines%20in%20your%20CD%20pipeline.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Microsoft

BTDF (BizTalk Deployment Framework) is actually an msbuild project with custom msbuild tasks. It can be customizable according to customer BizTalk project needs and it is extensible. BizTalk CI/CD pipeline can be implemented not only using TFS/Azure DevOps but also other DevOps tools like Jenkins, etc…

 

First, BTDF is installed to BizTalk machines on Complete mode. Then .btdfproj file is added to the solution. This file will be run in powershell script while deploying the dll. And this file can be extensible using tags for orchestrations, maps, bindings, etc.. (Capture1)

 

Then, CI process is prepared on Azure DevOps. The dlls, powershell scripts for running the btdf commands for deployment and .btdfproj file are packaged to DROP folder and published. (Capture1)

 

Packaged build artifacts include dlls, deployment.project, custom powershells etc. (Capture2)

 

After publishing, CD process is prepared for all environments. (Capture2)

 

The build tags are used to know on which environment we will deploy the projects. (Capture3)

 

Inside the boxes, there is a task for copying packaged files to BizTalk machines. (Capture4)

 

And Running powershell commands in BizTalk machines task. (Capture4)

 

Inside the deployment powershell script (DeployProject.ps1), you can see msbuild command which runs the btdfproj file (Capture5)

 

Same msbuild command used while deploying using Visual Studio BTDF toolbox. After deployment, the BizTalk services and IIS is restarted with powershell script (PostBuild.ps1) also. (Capture5)

 

To sum up, copy Build artifacts (dll, Deployment.btdfproj, *.ps1, etc) to BizTalk servers on your CD pipeline and run below command:

MSBuild.exe "C:\Devel\HelloWorld\HelloWorld.Deployment\HelloWorld.Deployment.btdfproj" /nologo /t:Deploy /p:Configuration=Debug

 

If you don’ t want to use BTDF, you can write your own deployment powershell scripts and run them in BizTalk machines in your CD pipeline.

0 Replies