Step 3: Create the build and release definition
The build and release definitions are Azure DevOps tasks, and should probably be done by a Azure DevOps admin. The build definition builds your project within your git repository, and the release definitions deploys it to your BizTalk Server environment.
Before you begin
Complete Step 2 - Create Azure DevOps token and install agent.
Add the Build tasks
In your project, select Pipelines > Create Pipeline:
Use the classic editor to create a pipeline without YAML:
Select Azure Repos Git > Continue:
Select the Empty template > Apply:
Set the Agent Pool. Your options:
Azure Pipelines: Select this option to use Azure hosted agents > windows-2019:
Default: Select this option to use your own defined agent pool:
In Phase 1, add a task, select Visual Studio Build > Add:
Select the Visual Studio Build task you just added, and set the following properties:
- Display name: Enter your build solution, such as
YourProjectName/YourProjectName.sln. - Visual Studio version: Select at least Visual Studio 2015. You can also select Latest.
- MSBuild Architecture: Select MSBuild x86.
Your properties look similar to the following:
- Display name: Enter your build solution, such as
In Phase 1, add a task, select Publish Build Artifacts > Add:
Select the Publish Artifact task, and enter your preferred Display name. For Path to publish, select the ... button, and choose the application project folder (e.g. appProjectHelloWorld). Select OK.
The Artifact Name can be anything you want. Select Save.
Go to Triggers, and set the Trigger status to Enabled:
Save & Queue to test your build definition. When you queue, you are prompted for the agent queue and your branch. Select the Default agent queue, and choose your branch. Select Queue.
A new build is started, and you can select it to check for a success or failure.
Add the release tasks
When the build succeeds, the release definition deploys your application to your BizTalk Server.
Select the Releases tab > New pipeline.
Select the Empty template > Apply:
Change the Environment name to Dev, or whatever you want to call it.
Select Add artifact, select your project, your build definition, and select Add:
Go to the Tasks tab, add a new task:
From the list, filter the results, select the BizTalk Server Application Deployment task > Add:
If BizTalk Server Application Deployment isn't listed, then install it at Deploy BizTalk Application.
Select the Deploy task, and enter the values:
Operation Name: Your options:
Create new BizTalk Application: Deploys a new application. If the application already exists, it uninstalls the current applications (full stop), and installs the new application. If continuous integration is enabled, it automatically redeploys the application when it is updated in the repository.
Update an existing BizTalk Application: Appends changes, such as schemas, to an already running application. It does not require a full redeploy of the application.
Install BizTalk Server Application: Install the applications, and you enter the BizTalk management computer name, and the deployment package path.
Application Name: The text you enter will be the application name in BizTalk Administration. Do not enter BizTalk Application 1.
Deployment package: Select the zip file to your application project, and select OK.
Select the Agent phase task. Select the Default Agent queue. Save your changes.
Select Release > Create release:
Select Queue. Check the status by clicking the release link. If it fails, the error displays. If it succeeds, the application is added to the BizTalk Administration console.
What you did
In VSTS, you created a build definition that builds your application within Git or Team Foundation Version Control (whatever you chose). When changes are made within the source control, the changes are automatically detected, and you can push them. After the build completes, you created a release definition that deploys the application to BizTalk Server, which you can see in BizTalk Server Administration.
Next steps
At this step, you're done. If you prefer, you can create environmental tokens within your BizTalk XML binding file, and create variables within VSTS that match the environmental tokens. See Configure environmental tokens and variables for the details.