This blog will show you how you can create a Azure Repo using Azure DevOps and use Deployment Center feature in Azure Web App to enable CI/CD
Step 1: Creating a Project ( Ignore if you already have a Project created)
Make sure you have adequate permissions to create a project: You must be a member of the Project Collection Administrators group or have the collection-level “Create new projects” permission set to Allow. If you’re the Organization owner, you’re automatically added to the Project Collection Administrators group.
- Login to Azure DevOps
- Click on New Project > Give a Project Name > Select a Visibility Type > Click on Create
Step 2: Creating / Importing the Repo
Click on the Project > Repos
Note: If you are unable to see Repos inside the project, Go to Project Settings > Overview > Make sure Repos service is turned on under Azure DevOps services
If you have the project files in you local machine you can create a new repo > clone and push, To do that once you are inside Repos > Click on New Repository > Give a Name and Click on Create
Click on Clone > Copy the Clone URL
If you already have a git hub repo with the source code, you can simply import the repo
Repos > Files > Import Repository
Give your Git Hub repo Clone URL > Git Hub Username & Password > Give a Name for the Repo > Click on Import
Note: You can also generate a PAT ( Personal Access Token ) in GitHub and use that instead of using a password to Authenticate
Step 3: Enabling CI/CD in Azure Web App
- Login to Azure Portal
- Navigate to your Azure Web App
- Click on Deployment Center and Select the Source as Azure Repos
Select the Organization, Project, Repository and the Branch > Click on Save
You have now configured CI/CD in Azure Web App using Azure Repos
You can make a commit and check the logs to see if the pipeline is triggered
Once the status is showed as Success ( Active ), Reload the web page / application to see the latest version
Add a Comment