Pre-requisites
Login to Azure Devops and open Project created in previous post.
1. Create Pipeline
i) Click on “Releases” in the left navigation menu under “Pipelines” followed by “New Pipeline” button.iii) Select
the source build pipeline and click “Add”
iv) Configure
variables
v) Enable
Continuous Deployment Trigger
vi) Add
2 Stages, Develop and Test and configure tasks. To add stages use “Add” button.
vii) Once
the stages added, we need to configure tasks for both the stages. Search for
template “Azure Functions for .Net”
and click “Apply”.
Configure
the task with FunctionApp name defined in the variables in step (iv).
viii) To test release pipeline, let’s manually create a release for the previous build [Refer], to do this we need to click on “Create Release” button.
ix) Select
the develop stage for manual trigger along with the source build artifacts and
click “Create”
Note
– This manual step is just for testing, in actuals, once you push code from
visual studio your build pipeline will trigger followed by release pipeline
thus creating a release automatically. There will be no manual release trigger.
x) Navigate
to Releases to see recent release created.
Open the recent release to see the details of the stages. We
see the develop stage triggered automatically and succeeded, this will deploy
the FunctionApp to Dev resource group in azure.
Once
the agent is available, test stage is triggered, which will deploy the
FunctionApp to QA resource group in azure.
Finally,
we see, both the stages completed successfully, thus deploying the FunctionApp
to both the resource groups “Dev” and “QA” from a single release trigger.
Hope
this gives you clear picture of continuous deployment. This completes series Deploy Azure Function via Azure Devops CI/CD Pipelines.
Happy Learning, LET'S SHARE !
No comments:
Post a Comment