In this post, I’m going to explain how to create a pipeline and a release in Azure DevOps that releases into AppServices. This is quite important step to go forward a digital transformation in your company to improve and optimize the developer’s process.
pipeline Azure DevOps builds the solution (projects and tests) and create an
artifact. Then, with the
release, it publishes the
artifact into to a AppService in Azure. Now I show step by step how to create both.
Table of contents
First, you have to create a New pipeline and then select where your code is. If you select one of the elements in the list, Azure DevOps will create an
YAML file. This wizard is not suitable for me; then I want to “
Use the classic editor”
After this choice, I have to select my repository. My repository is in
Azure Repos Git and then some fields are already prepopulated.
In this step I have to select:
- Team project
- Default branch for manual and scheduled builds
If you want to implement Git Flow branches for your deployment, please read the post I created about it.
Then, I have to choose a template: I search and add
ASP.NET Core. Now, I have to add 4 steps before publishing the artifact.
Restore the Nuget packages for the solution. In the
Path to project(s) I explicitly say what project I want to build.
Run the tests for the solution, if there are exists.
This step is building all projects. Add in
Path to project(s):
Publish the compiled project(s) in a zip file in a particular directory, so, I can read it later. For that, add in
Arguments this text:
Publish Artifact: drop
Finally, I publish the artifact from a specific directory in
Path to publish:
- Publish web projects
- Zip published projects
The release takes the artifact and publish it in an
Azure AppService. First, select from where it has to take the artifact and remember to enable the continuous deployment.
Package or folder in $(System.DefaultWorkingDirectory)/*/.zip
So, in this short post I explained how to create a process in Azure DevOps to release AppServices.Leave a comment