Continuous Delivery

Continuous Delivery is the practice of deploying a package into a non-production environment in an automated manner.

Once our Continuous Integration process is completed successfully, we can deploy a package using the Continuous Delivery practice in an automated way.

  1. Click on the Releases in VSTS.
  1. Click on New definition:
  1. Select the Azure App Service Deployment template and click on Next:
  1. Select the Project and Build definition that we created in the previous section.
  2. Select the Continuous Deployment checkbox.
  1. It means that whenever the associated Build definition is successfully executed, release definition will be triggered automatically. Click on Create:
    • The new Release definition is ready.
    • Let's configure it.
    • We need to configure Azure Subscription first.
  1. Click on Manage:
  1. Click on New Service Endpoint.
  2. Select new Azure Resource Manager:
  1. Provide a Connection name and select Subscription:
  1. Verify the newly created endpoint:
  1. Go to the Release Definitions. Refresh the list of Azure subscriptions:
  1. Click on the Authorize button:
  1. Refresh the list of App Service names and select the Function App created earlier.
  1. Save the Release definition:
  1. In the package or folder, select the location which we have given in the Publish Artifact task in the Build definition:
  1. Now, we have the Build & Release definitions ready.
  2. Go to the Build section and click on Queue new build.
  3. Click OK:
  1. Wait for the availability of Hosted Agent. Hosted Agent is a virtual machine available for use where most of the required packages are available to execute the build:
  1. Once all the tasks defined in the Build definition are executed successfully, then the Build definition is successful:
  1. We can click on the specific task to get the task-specific logs:
  1. If in the Release definition, the trigger for Continuous Deployment is not selected, we can execute the Release definition manually too.
  2. Click on Create Release:
  1. Select the Build version as the source and click on Create:
  1. Observe the summary of the ongoing execution of the Release definition:
  1. Click on the Logs tab to see the logs related to specific tasks.
  2. It will download artifacts and deploy the Azure function into the Azure Functions app:
  1. Verify the Function Apps in Azure Portal:
  1. Go to the Kudu editor and verify the function deployment.
  1. To go to the Kudu editor, and in the Azure Function URL, add scm after the function name:
  1. Now, try to upload an image in the blob container so our function gets executed.
  2. Verify whether the new function is operational or not:
  1. To configure Continuous Deployment automatically, we can go to the Triggers tab in the Release definition:
  1. Now, once we have configured triggers for the Build or Release definitions; change the code:
  1. Verify the summary of the Build definition execution and see the Associated Changes section:
  1. Once the Build execution is completed successfully, the Release definition will execute immediately.

 

  1. Verify the Summary of the Release definition and see if it is triggered by the Build definition that we have created:
  1. After the Release definition is executed successfully, upload another image in the blob container and verify the logs of the Azure Function:

Done.

We have configured Continuous Integration and Continuous Delivery for Azure Functions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.123.155