Integrating Service Now with Azure Devops - azure-devops

i am trying to have an integration between service now and azure devops .
If any one can answer below question it be much appreciated.
How to trigger Azure DevOps pipeline automatically on Approving the Change Request in ServiceNow ?
I am approaching with rest API method to call AzureDevops from servicenow plateform.
Does anyone has done something similar and can help me here by listing steps to do so?

You need to create a Service Connection to you ServiceNow instance and then add a Gate in your Release pipeline which creates the Change Request in ServiceNow and then waits for it's status to change.
This provides a good guide - https://learn.microsoft.com/en-us/azure/devops/pipelines/release/approvals/servicenow?view=azure-devops and your gate will end up looking something like this:
You can also use an existing CR but then you'll need a way to supply that to the pipeline on creation of the release.

In the azure devops, we can Install and configure ServiceNow DevOps extension for Azure DevOps to send build and release notifications from your Azure pipeline to ServiceNow DevOps application.
For more details, you can refer this doc: Azure DevOps integration with DevOps

Related

Is it possible to update a file in azure devops repository using power automate?

I can't find any connector in power automate to update a file in azure devops repository.
I am trying to automate the process of checkin our deployment sheet in azure devops repository. My flow is triggered when the custom work item type is closed. An adaptive card is sent to teams where the user can update the logs. Then I want to automatically update the log sheet present in azure devops. Prior to this we used to update the sheet in excel and again commit it from visual studio.
For operations which are not supported by the default connector you could always look into using the Azure DevOps REST API service in combination with an Send an HTTP request to Azure DevOps action.
I would look into using for example the Pushes - Create method:
https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pushes/create?view=azure-devops-rest-6.0&tabs=HTTP
Have a look at this StackOverflow thread, that might be useful as well:
How to use Azure DevOps REST API to Update File?

difference between azure devops cloud and azure devops server 2019

I cannot find the below configuration in azure devops server (aka TFS)
Please find the below screenshots from azure devops where you can do exactly that
1- Add a public source
2- Add a custom npm registry
3- You can see folio added to upstreams
enter image description here
So why do you think TFS 2019 can't do just that?
It seems to be a new feature, Azure DevOps Service contain the latest feature and we could check the timeline in this site.
And Azure DevOps Server is updated once a period of time. If we check some new feature in the Azure DevOps Service and does not see it in the Azure DevOps, we need to check this Azure DevOps Server 2019 Release Notes and wait for the update.

How to trigger Azure DevOps pipeline when pushing commits to bitbucket custom server?

My company's repository hosted on bitbucket custom server which can be only accessed from intranet.
Therefore, I setup a self-host agent for Azure DevOps and this agent could do a git pull and build and release too.
It works and the problem is I have to manually click RUN pipeline to start, and somehow when I pushing commits to my bitbucket custom server it doesn't trigger the Azure DevOps to kick off a build or release.
Is there some other options I could let it automatically triggers the Azure pipeline to run? Webhooks or Hooks?
I afraid Azure devops pipeline cannot be automatically triggered from a bitbucket custom server. For azure devops server cannot communicate to the bitbucket server hosted in your intranet.
Webhooks or Hooks cannot trigger a build in azure devops pipeline either. Azure devops doesnot have this feature yet. There is an open issue about this.
Currently you might have to trigger your pipeline manually, or create an azure function as mentioned in above link to trigger your pipeline automatically.
Below are some documents about azure function you may find helpful:
Develop Azure Functions using Visual Studio
Continuous deployment for Azure Functions
Azure Functions HTTP trigger:The HTTP trigger lets you invoke a function with an HTTP request.
Best approach to call web api from azure function
Trigger Azure Pipelines build via API

Call a release build from REST api in Azure

I want to call the Azure Devops to create a new release from one of my Release Pipelines.
I have been looking for different calls but its either to create the pipeline or build artifacts.
Is there a way to call a release pipeline from Azure API?
I did it with the next endpoint: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/Builds/Queue?view=azure-devops-rest-5.0&viewFallbackFrom=vsts-rest-4.1
I was using a wrong body for the endpoint. With the example from the documentation it worked.

Can I have a Teamcity build triggering an Azure Devops build job?

I'm migrating Teamcity to Azure Devops, as with our on-prem infrastructure. During that period we'll have both Teamcity and Azure Devops deployment for different infrastructures, but we want to reduce the amount of human intervention. So I was thinking in having either Teamcity triggering the Azure Devops build, or vice Versa. I think it would be easier to implement a powershell script that triggers the build on Azure Devops, instead the other way around because of compatibility issues, or version issues(old version).
Yes, you can use Azure Devops api to trigger the build. You would use this api call with appropriate body:
POST https://dev.azure.com/{organization}/{project}/_apis/build/builds?api-version=5.0
Reading: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/queue?view=azure-devops-rest-5.0
I'm not familiar with Azure Devops powershell modules if any, but they might work as well.