0
0
Azurecloud~30 mins

Deployment methods (Git, ZIP, CI/CD) in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Deployment Methods: Git, ZIP, and CI/CD on Azure
📖 Scenario: You are working as a DevOps engineer for a small web application team. Your team wants to deploy their app to Azure App Service using three common deployment methods: Git deployment, ZIP deployment, and a simple CI/CD pipeline.This project will guide you step-by-step to set up these deployment methods using Azure CLI commands and configuration variables.
🎯 Goal: Build a small Azure deployment script that sets up deployment using Git, ZIP, and a CI/CD pipeline configuration variable. You will create variables for app name and resource group, configure deployment methods, and print the final deployment method chosen.
📋 What You'll Learn
Create variables for Azure App Service name and resource group
Add a configuration variable for deployment method
Write commands to deploy using Git and ZIP methods based on the configuration
Print the chosen deployment method
💡 Why This Matters
🌍 Real World
Deploying web applications to Azure App Service is a common task in cloud DevOps. Knowing how to configure deployment methods like Git and ZIP helps automate releases.
💼 Career
This project teaches foundational skills for Azure DevOps engineers and cloud developers who manage app deployments and continuous integration pipelines.
Progress0 / 4 steps
1
Create Azure App Service variables
Create two variables: app_name with value mywebapp and resource_group with value myResourceGroup.
Azure
Need a hint?

Use simple assignment statements to create the variables with the exact names and values.

2
Add deployment method configuration
Add a variable called deployment_method and set it to git to specify the deployment method.
Azure
Need a hint?

Use a string variable named deployment_method and assign it the value "git".

3
Write deployment commands based on method
Write an if statement that checks if deployment_method is git. If yes, write the Azure CLI command to deploy using Git: az webapp deployment source config-local-git --name mywebapp --resource-group myResourceGroup. Otherwise, if deployment_method is zip, write the Azure CLI command to deploy using ZIP: az webapp deployment source config-zip --name mywebapp --resource-group myResourceGroup --src app.zip.
Azure
Need a hint?

Use an if-elif statement to check the deployment_method variable and print the corresponding Azure CLI command using f-strings.

4
Print the chosen deployment method
Write a print statement that outputs: "Deployment method chosen: git" if deployment_method is git, or "Deployment method chosen: zip" if it is zip.
Azure
Need a hint?

Use a print statement with an f-string to show the deployment_method variable value.