Please refer to the previous part to understand the basics of Azure DevOps and a hands-on lab.
This part will cover the following things.
- Hands-on Lab - Create App Service in Azure
- Hands-on Lab - Create a build pipeline
- Hands-on Lab - Create a release pipeline (artifacts + tasks)
- Hands-on Lab - Run the Azure app
- Hands-on Lab - Enable continuous deployment + Code changes
- Hands-on Lab - Post to slack using Service hooks
Hands-on Lab - Create App Service in Azure
Steps to be followed,
- Open http://portal.azure.com and select an active subscription.
- Go to the "App Services" section and click on the "Create" button.
- Choose a web-app.
- Provide the name of the app along with the resource group and service plan.
- Click "Add".
- Check if the app-service is created and running or not.
Hands-on Lab - Create a build pipeline
Steps to be followed,
- Open https://dev.azure.com/ and log in using your Azure credentials.
- Go the "Pipelines" tab, select the build, and click on "Create new build pipeline".
- Choose a repo (GitHub / AzureDevops Git)
- Select ASP.NET template and apply.
- Click on "Save and Queue" after checking all the options and wait for the success.
- Open your mailbox to check email.
Hands-on Lab - Create a release pipeline (artifacts + tasks)
Steps to be followed,
- Open https://dev.azure.com/ and log in using your Azure credentials.
- Go to the pipeline section and select "Release".
- Create a new release and select a template ‘Azure App Service Deployment’.
- Add an artifact section and select source as build.
- Select a build definition and click "Add".
- Now, go to the stage and click on the added task.
- Select Azure subscription and created the web-app.
- Then, go to “Deploy Azure App Service” and choose a package folder to test.zip
- Save
- Create a release from the release pipeline and wait for its success.
Hands-on Lab - Run the Azure app
Steps to be followed
- Open http://portal.azure.com and go to the app-service.
- Copy the URL from the Overview section.
- Hit the URL on the browser and wait to see the application changes.
Hands-on Lab - Enable continuous deployment + Code changes
Steps to be followed -
- Go to the Build section >> Triggers section and then enable continuous deployment.
- Go to the Release section >> artifacts section and enable “release every time”.
- Click on the "Save" button.
- Open VS 2017 and do any change in the view of the app.
- Push those changes and wait for the build and release to get success.
- Run the app to check the changes.
Hands-on Lab - Post to slack using Service hooks
Steps to be followed -
- Open the Slack app and create a private channel over Slack – for example - ‘test’.
- Go to Channel Settings and click on ‘Add Apps’.
- Click on ‘View App Directory’ and search for ‘Visual Studio Team Services’.
- Click on "Install for the channel" and add integration.
- Copy the ‘Web Hook URL’ and Save Integration.
- Open https://dev.azure.com/ and log in using your Azure credentials.
- Go to the project settings and click on service hook.
- Add a subscription, choose Slack and Build completed option – paste service hook.
- Click on Test
- If successful, queue a new build and check for the message posted on the new channel.
Stay tuned for the next series of articles which will cover a deep dive into Azure Devops.
Happy learning!