Using LogicApp to make post in Teams with link to open pipeline - azure

I know it's possible to create Logic App in Azure to send message in Teams after completing pipeline. I don't know how can I add hash with completed pipeline as clickable link to open.
I couldn't find any information how can I do this.
I will be grateful for your help.

Azure DevOps Pipelines already have official support to integrate into Microsoft Teams that you could use directly, even without a Logic App.
But if you still need to use a Logic App, then what you could do is use the Invoke a REST API task to call your Logic App, and then send an Adaptive Card which you can design to have a button which links to the pipline.

Related

Azure Pipelines conditions

I have setup a flow where azure release definition makes to an agentless API call to azure build pipeline which performs a list of tasks which trigger a release.
I would like to add a condition to the azure build pipeline to differentiate between a user running the build pipeline manually (through portal) or if the pipeline was triggered via an api call.
What is the neatest way to do this? Ideally I expect a condition something like
eq(triggered-by, "Joe") -> not ideal, I don't want to attach condition based on a users name
eq(build-reason, "api") -> ideal but is there some in-build condition for something like this?
One other options which passes through my mind is passing a custom runtime variable through the api call, but I was wondering if there was a more in-built approach.
Thanks in advance.
Currently, there's no build-in feature in Azure DevOps to achieve this.
We cannot judge whether it is triggered by manually or API. If you are using an API call, the token also stands for a single user.
Also, you could raise a feedback ticket for your demand: Suggest a feature - Visual Studio (Windows) | Microsoft Docs

Azure DevOps REST API, how to allow Azure Function to create workitems in DevOps project?

I'm creating a schedule-triggered Azure Function which will run tests once a day. If during the run any test fails, I want it to create a bug on a Azure DevOps project which includes a log of the failed tests.
I know I could create a PAT so that it can authenticates with the DevOps REST API but I don't like its downsides:
it can be valid for 1 year at maximum, I will need to remember to extend its expiration period
every bug created like this will have me as its creator
Edit:
I found out I could use a MS Flow - there's a DevOps connector that can create workitems, still it has a downside of having me as workitem's creator but it's not such a pain...
Still would much appreciate to learn about other options...
Is there any better way I can let my Azure Function to create bugs on my DevOps project?
An alternate option would be the use azure logic app along with azure function.
Here the azure function would directly call a azure logic app and the logic app would create a bug workitem .
Refer the following article by Stefan stranger
On how to create logic app which will create the bug. Here we will be using azure webhooks for the creating of bugs.
Now you can either send the data to a storage account where the logic app using some trigger to get the data and then use it to create bug, or you can directly connect to the logic app .
Refer the following article by Laura KokKarinen for this .

How to create a Webhook between Google chat and Azure devops

Is it possible to connect a Google Chat room using Azure devOps WebHooks?
Thanks
Web Hooks in Azure DevOps provide a way to send a JSON representation of an event to any public endpoint (HTTP or HTTPS).
But it's not able to directly contact Google chat room with Azure DevOps. Cause DevOps sends a JSON message in a format that Chat is not able to understand. Which means they do not talk to each other by default.
We need a way to transform the message and tie those two services together. There are a lot of options for that. We could use a 3rd-party tool Zapier.
It allows to easily integrate various services and APIs and I highly
recommend it, although it is a subject for another post.
You could refer this step by step tutorial-- Azure DevOps integration with Google Hangouts Chat

Azure DevOps - Create a work item from incoming email

I'm in the process of setting up an in-house Azure DevOps environment. But I'm stuck at a point where I need to set up an email integration.
Question: is it possible within Azure DevOps to create a work item (in general/specific to a project) upon receiving an email?
Trigger: Users report issues via a generic email address (like support email)
Manage: Azure DevOps to capture this email (monitor inbox of this generic email address)
Output: A new work item is created with the contents/subject from the captured email.
Note: Issues could either be a bug, minor usability or other supports
I did look into MS Power Automate using flow. But not ideal in my
case
Searched market place for a possible plugin. But couldn't find one
which does this
Thanks in advance for any help or direction.
Thanks you for all fellow contributors who suggested alternative approach. Unfortunately, these suggestions doesn't solve my concern at its level and hence I raised a feature request in Azure DevOps Server forum. You may find the request here and please vote it if you think it is relevant to you.
The easy way is to use the TFS Work Items from Outlook tool.
It's give you the ability to create a work item from outlook and also create rules for create work items automatically (with templates).
Note: the name is TFS Work Items but it should works also with ADO.
Azure DevOps does not contain feature to create work items through email. You can try:
TeamBox (pop3)
As you mentioned MS Power Automate or Azure Logic App.
Create your solution with existing resources. As example: Mail.dll - .NET email component (IMAP, POP3, S/MIME), Create Work Item in Team Services Through API
As Shamrai Aleksander mentioned above, for now Azure Devops Service doesn't support creating WITs from email.
Not sure if above extensions shared by Shamrai Aleksander and Shayki Abramczyk meet your needs well, I think you can also consider posting a feature request if you do want such feature comes true in Azure Devops Service. Since it's a good idea, feel free to suggest a feature to User Voice Forum of ADO.
Your requirements seems to be similar to this one which is posted in 2019, I recommend you can post a new one to share your feedback. Also, share the link in your question and members who interested in that would vote for you! Hope it helps.
This is a good use case for a Logic App. You can create an app that triggers on a new email, using the Outlook connector, and then create a work item using the DevOps connector.
You can also add logic in the middle (using the Control connector and variables, for instance), to assess the content of the email and dynamically set the target project, work item type, or tags.
You can user Microsoft Power Automate to do that.
You activator would be receiving an email and the rest of the workflow is up to you. It creates issues correctly and there is even a workaround to add files to the issue with power automate.

Need to send Publish Test result chart in Email notification

I need to capture image form publish test result and that captured image needs to send in an email.
is this possible in Azure DevOps ci/cd pipeline?
I have attached below screenshot for reference.
Please help me.
This is not available as an out of the box feature as of today, AFAIK. At most, you can see the stats of the latest test run included in the build completion email notification with a link to the see them on the Portal.
However, you can search for suitable Azure DevOps extensions in the Visual Studio Marketplace, or submit your suggestion at the Developer Community for Azure DevOps for our Team to look at.

Resources