This blog post will demonstrate how to integrate Azure DevOps Boards with a Slack or Slack channel. Azure DevOps is a platform that contains many tools to help the development, testing, integration, and deployment of an application.
Here we will not discuss all the tools available in the Azure DevOps but I will show how to integrate Azure boards with Slack messaging and alerting tools.
To complete this tutorial you need an Azure DevOps account and a Slack account.
Create an Azure DevOps account
First, create an Azure DevOps account to get started, visit the link https://azure.microsoft.com/en-in/services/devops/ and create an account with Github (For this tutorial I have used my GitHub ID)
Once you created and logged in to the Azure DevOps account you can see a home page as below.
Give a name for your project and click the “Create project” button to create your first project.
For the demo purpose, I will create a new project with Agile methodology, so we can create few user stories and can work with it.
To create a new project, go to the Organization (Here my organization name is techiescorner) and click the “New project” button on the top right side.
Given a name for the project and select Agile from the Advanced tab.
Click create button to complete it.
Next, we will create a new story, to create a user story, select Boards -> New Work Item -> User story. Give a name for the user story, description and save it.
Click on “Boards” again to see all the user stories which we created. Now we have a Board and a user story, next we will integrate this Board with Slack so we will get alerts when a change happens to this Board.
Slack is a communication and alerting tool. With the help of Slack, we can see the changes or events happening on the Board and can set notifications.
To create a slack account visit the link https://slack.com/intl/en-in/get-started#/createnew
Once you logged in to the account, create a “workspace” by adding your team or company name.
You can give a name to your team and can skip the remaining steps. Once you are done you will get a page similar to the below.
To integrate our Azure DevOps board click on project -> “Settings & Administration” -> Manage Apps. On the next page search for Azure boards.
Click the “Add to Slack” button to add this plugin. Next, we have to select a channel where we want to see the messages. I have selected my “Dev-Team” channel for this. Refer to below screenshot.
Click allow “button” to complete the action. Go to the “Dev-Team” channel and you can see a new message is printed.
As the message suggested, to login to the Azure board copy and paste the /azboards signing to the message window. Then you will get another message with the “Sing in” button.
Logged in to your Azure DevOps account and authenticate. It will prompt a page with code and add that code to the “Enter code” session in Slack. Then you will get another message “Successfully signed in to Azure Boards as <mail@account>.
as seen in the latest message add your Project URL in the message field and hit enter.
Now we have integrated our project with the slack channel. Next, we have to add a Subscription. Subscription will help to create an event in the slack channel. For example, here will add a subscription that is when a user creates a user story we will get the message in the slack channel.
Click the “Add subscription” button to create a subscription. Refer screenshot.
To test this subscription, go to the Azure DevOps board and create a new user story.
I have created a new user story named “Slack test story” and saved it.
Go to our Slack channel and make sure that we have received a new notification about the new user story which we created.
Yes, we could successfully integrate Slack with Azure DevOps boards. From the last message, we will get Task ID (2) and story name
We can create tasks from the Slack channel itself. For this, you need to type “/azboards create” in the chat window and follow the screen.