Microsoft Azure Slack Channels – Azure Pipelines

Slack Approvals
Azure Cloud

Share Post Now :

HOW TO GET HIGH PAYING JOBS IN AWS CLOUD

Even as a beginner with NO Experience Coding Language

Explore Free course Now

Table of Contents

Loading

This blog gives a step-by-step overview of how we can use the Azure Pipelines app for Slack to easily monitor the events for our pipelines.

The technologies that are covered in this blog are a part of the Azure DevOps environment. If it’s something in which you have an interest or you want to learn, then you can visit our previous blog to know more about the [AZ-400] Microsoft Azure DevOps Certification.

In this blog, we are going to cover:

  1. Azure Pipelines with Slack
  2. Add the Azure Pipelines app to your Slack workspace
  3. Approve deployments from your channel
  4. Azure Boards with Slack
  5. Azure Repos with Slack

Slack is deprecating the Visual Studio Teams Services (VSTS) app from its app store.

This app was built by the Slack team a few years ago and provides basic integration between VSTS and Slack.

The app allowed users to get notified of the events in Azure DevOps such as the creation of pull requests, updates to work items, completed builds, and more.

In addition to receiving notifications on events from Azure DevOps, these new apps support rich features such as:

  • Creating work items using a command or messaging action
  • Approving/rejecting releases from the Slack channel
  • Notifying teammates with @mention support for action
  • Unfurling URLs for work items pull requests and pipelines
  • Supporting notifications for new YAML based pipelines

Azure Pipelines With Slack

We can set up and manage subscriptions for builds, releases, YAML pipelines, pending approvals, and more from the app and get notifications for these events in your Slack channels.

Azure Pipeline events

This feature is only available on Azure DevOps Services. Typically, new features are introduced in the cloud service first, and then made available on-premises in the next major version or update of Azure DevOps Server.

Check Out: What is Azure DevOps? Click here

Add The Azure Pipelines App To Your Slack Workspace

Use the /azpipelines handle to start interacting with the app.

Azure Pipeline slack message

Once the app has been installed in your Slack workspace, you can connect the app to the pipelines you want to monitor. The app will ask you to authenticate to Azure Pipelines before running any commands.

Azure Pipeline slack sign in

To start monitoring all pipelines in a project, use the following slash command inside a channel:

/azpipelines subscribe [project url]

For example:

/azpipelines subscribe https://dev.azure.com/myorg/myproject/

To manage the subscriptions for a channel, use the following command:

/azpipelines subscriptions

This command will list all the current subscriptions for the channel and allow you to add new subscriptions.

Azure pipeline notification on slack

Approve Deployments From Your Channel

Azure Pipeline approvals from slack

Whenever the running of a stage is pending for approval, a notification card with options to approve or reject the request is posted on the channel. Approvers can review the details of the request in the notification and take appropriate action. In the following example, the deployment was approved and the approval status is displayed on the card.

Deployment approval status

The app supports all the checks and approval scenarios present in the Azure Pipelines portal, like single approver, multiple approvers (any one user, any order, in sequence), and teams as approvers. You can approve requests as an individual or on behalf of a team.

Also Check: What is Ansible? Click here

Azure Boards With Slack

Azure Boards and slack integration

If we use Slack, you can use the Azure Boards app for Slack to create work items and monitor work item activity in your Azure Boards project from your Slack channel.

The Azure Boards app for Slack allows users to set up and manage subscriptions for creating, update, and other work item events, and get notifications for these events in their Slack channel.

Conversations in the Slack channel can be used to create work items. Previews for work item URLs help users to initiate discussions around work.

Slack channel message previews

  • To create a work item, we must be a contributor to the Azure Boards project.
  • To create subscriptions in a Slack channel for work item events, we must be a member of the Azure Boards Project Administrators group or Team Administrators group.
  • To receive notifications, the Third-party application access via OAuth setting must be enabled for the organization.
  • Once after the above is done, we can see the welcome app message from the Slack channel.

Azure Boards Sign in for slack

Once the app has been installed in your Slack workspace, connect and authenticate yourself to Azure Boards.

Azure boards sign in contd.

After signing in, use the following slash command inside a Slack channel to link to the Azure Boards project which you specify with the URL :

/azboards link [project url]

for example :

/azboards link https://dev.azure.com/myorg/myproject

Create a work item with a command

With Azure Boards app you can create work items from your channel. The app supports custom work items as well.

To create a work item, use /azboards create.

Work item creation

You can create work items directly from command by passing work item type and title as parameters. Work items will be created only if they do not have any fields to be mandatorily filled.

/azboards create [work item type] [work item title]

/azboards create ‘user story’ Push cloud monitoring alerts to mobile devices

we can create a work item based on the message shown below

work item creation procedure

This will be the preview of the work item created from the slack channel.

work item preview

To know more about Veracode, Click here

If you use Slack, you can use the Azure Repos app for Slack to easily monitor your Azure repositories.

We can set up and manage subscriptions to receive notifications in your channel whenever code is pushed/checked in and whenever a pull request (PR) is created, updated or a merge is attempted.

This app supports both Git and Team Foundation Version Control (TFVC) events.

Git control from slack demo

  • To create subscriptions in a Slack channel for repository-related events, we must be a member of the Azure Project Administrators group or Team Administrators group.
  • To receive notifications, the Third-party application access via OAuth setting must be enabled for the organization.

Azure Repos

Once the app has been installed in your Slack workspace, connect and authenticate yourself to Azure Repos using /azrepos signin command.

Azure Repos Setup

To start monitoring all Git repositories in a project, use the following slash command inside a channel,

/azrepos subscribe [project url]

/azrepos subscribe https://dev.azure.com/myorg/myproject/

For GIT:

/azrepos subscribe https://dev.azure.com/myorg/myproject/_git/myrepository

For TFVC :

/azrepos subscribe https://dev.azure.com/myorg/myproject/_versionControl

The subscribe command gets you started with a default subscription. For Git repositories, the channel is subscribed to the Pull request created event (with target branch = master), and for TFVC repositories, the channel is subscribed to the Code checked in the event.

Azure repo events

To view, add and remove subscriptions for a channel, use the subscriptions command:

/azrepos subscriptions

Azure repo subscription

Example: Get notifications only when my team is in the reviewer list for a PR

Azure review group

Example: Tell me when merge attempts fail due to a policy violation

Azure repo information on slack

When a user pastes the URL of a PR, a preview is shown as the one in the following image. This helps to keep PR-related conversations contextual and accurate.

URL preview in slack

These are the 3 main SLACK APP which is mainly used for Azure DevOps. We can have this integrated and do the day 2-day work being in the slack itself.

Related/References

Next Task For You

Begin your journey toward Mastering Azure Cloud and landing high-paying jobs. Just click on the register now button on the below image to register for a Free Class on Mastering Azure Cloud: How to Build In-Demand Skills and Land High-Paying Jobs. This class will help you understand better, so you can choose the right career path and get a higher paying job.

azure cloud job free class

Picture of mike

mike

I started my IT career in 2000 as an Oracle DBA/Apps DBA. The first few years were tough (<$100/month), with very little growth. In 2004, I moved to the UK. After working really hard, I landed a job that paid me £2700 per month. In February 2005, I saw a job that was £450 per day, which was nearly 4 times of my then salary.