Continuous Integration
Continuous Integration is one of the most popular and core DevOps practices. Continuous Integration is a practice where code is committed to a shared repository such as Git, and the committed code is verified against static code analysis, automated build, and unit test cases.
- Let's create a build definition.
- Click on the Git repository and click on
Set up build
:
![](https://static.packt-cdn.com/products/9781787122932/graphics/3bda2849-a8a0-40d6-9408-88aa72aaa462.png)
- Select a template
Azure Web App
and click onApply
:
![](https://static.packt-cdn.com/products/9781787122932/graphics/322b4d36-8f49-4139-8c44-3f759ee6058f.png)
- Keep only
Get sources
andPublish Artifact
tasks. - Click on
Add Task
and addCopy Files
task to the Build definition:
![](https://static.packt-cdn.com/products/9781787122932/graphics/1c8b7e40-063c-483b-8586-c061bf3d2534.png)
- We want to copy all the files available from the Azure Functions project.
- Provide the details for
Target Folder
:
![](https://static.packt-cdn.com/products/9781787122932/graphics/525e225f-7258-46f4-87e3-a949ac7dc865.png)
Publish Artifact
is used to make available files to be used in the Release definition:
![](https://static.packt-cdn.com/products/9781787122932/graphics/d04b847d-1bf8-486b-b187-3d452a86a440.png)
- In the
Triggers
section, enable the Continuous Integration trigger. Now, if any new code is checked in, then Continuous Integration will take place:
![](https://static.packt-cdn.com/products/9781787122932/graphics/40e617d6-b30b-41fc-bd5b-6e3dbeca83f2.png)
- Click on
Save
. Our Build definition is ready.
In the next section, we will create the Release definition.