azure-devops

How to split this duplicated Azure DevOps steps into a reusable template

ぃ、小莉子 提交于 2021-01-28 04:27:18
问题 I have the following Azure DevOps template, which is currently hardcoded to some specific files. I'm hoping to refactor it into a simpler template using loops so I don't need to duplicate (and hardcode) specific files. [ pseduo code for brevity ] #tests.yml steps: # pre-test steps. This is done once. - script: install tool1 - script: install tool2 - script: setup path stuff. # Tests - script: test project1 | display codecoverage to console-out - script: test project 2 | display codecoverage

Get all work items from a project azure devops REST API

若如初见. 提交于 2021-01-28 04:24:06
问题 I'm using Azure devops API to create a notification bot with AWS Lambda node.js. At this moment i need to check if each task work item is attached to a parent user story. The first step will be to get all the task work items on "given" project, for this step i was reading azure devops api documentation and found this: Work Items - List The API is asking for the id of the workitem that i want to get, but what if i need all the workitems from "given" project? GET https://dev.azure.com/

How to specify credentials for external nuget feeds in VSTS nuget restore

末鹿安然 提交于 2021-01-28 03:30:37
问题 I'm using the built in nuget task in VSTS to do a package restore. Our feed is hosted on an internal Artifactory server, and is referenced as a package source in my nuget.config. I'm then using a nuget service endpoint in VSTS to store the credentials to access that feed. But when I run the build I get the following in the build log, and every request to the nuget feed results in a 401 Unauthorized. CredentialProvider.TeamBuild: URI Prefixes: CredentialProvider.TeamBuild: https://ukipo

How to specify credentials for external nuget feeds in VSTS nuget restore

为君一笑 提交于 2021-01-28 02:17:02
问题 I'm using the built in nuget task in VSTS to do a package restore. Our feed is hosted on an internal Artifactory server, and is referenced as a package source in my nuget.config. I'm then using a nuget service endpoint in VSTS to store the credentials to access that feed. But when I run the build I get the following in the build log, and every request to the nuget feed results in a 401 Unauthorized. CredentialProvider.TeamBuild: URI Prefixes: CredentialProvider.TeamBuild: https://ukipo

Open a bug on release fails in VSTS Continuous Deployment

纵然是瞬间 提交于 2021-01-28 01:50:32
问题 I have configured and scheduled only release definition on VSTS for Azure solution deployment which is having PowerShell tasks. But I want to open a bug or work item in VSTS if release/ deployment fails. Is it possible in VSTS. 回答1: Yes, it’s possible for VSTS to create a bug if a release failed. Add another PowerShell task in the end of your release definition to create a bug if the previous task fails. Detail settings for the PowerShell task as below: Select Only when a previous task has

How to access azure Dev Ops data such as Changeset between dates using python?

百般思念 提交于 2021-01-28 01:41:28
问题 I am trying to connect to AZURE Dev-Ops and acquire change set information to automate the release notes preparation using PYTHON. Upon reading the documentation and the process provided in from github link, i have used the following: from azure.devops.connection import Connection from msrest.authentication import BasicAuthentication import pprint # Fill in with your personal access token and org URL personal_access_token = 'mypattokenvalue' organization_url = 'https://dev.azure.com/myorg' #

Azure DevOps: How to set the value of the Variable in Variable Group

女生的网名这么多〃 提交于 2021-01-28 00:32:04
问题 I am trying to overwrite the value of the variable from Variable Group in Azure DevOps and it's not working. It's always showing the original value. I wrote my Powershell scripts as shown by these links: Microsoft StackOverflow I added the Variable Group and Link it in my Build pipeline. I wrote the following scripts in Power Shell Script task. Write-Host "Original BPOwner = $(BPOwner)" Write-Host "Changing value of BPOwner to Bright Ran" Write-Host "##vso[task.setvariable variable=BPOwner;

Creating a new Team Project using the REST api

五迷三道 提交于 2021-01-27 23:52:37
问题 Ive been banging my head against this all week. Creating a new Team Project using the REST api. Everywhere i look, the response is the same, and it always involves using command line and xml. But why? On the visual studio online pages this can be found: https://www.visualstudio.com/en-us/integrate/api/tfs/projects (Specifically looking at the part labelled "Create a team project") So why does this exist if it cant be used? Or am i missing something? If anyone knows any examples of using this

How can one make files in an Azure DevOps repository publicly accessible?

笑着哭i 提交于 2021-01-27 23:41:16
问题 Is it possible to get a raw link to a file or path that is hosted in our Azure DevOps repository; like we can share on GitHub? 回答1: Not at present time. VSTS is intended to be a private code repository for teams, not public. You can always push your repos to GitHub as well as VSTS if you want to provide public code. 回答2: Yes, this is possible if your project is defined as public; the API that allows one to do this is documented here. An example from one of my public repos: https://dev.azure

How to use service account to impersonate users in Azure Devops

大兔子大兔子 提交于 2021-01-27 21:50:36
问题 I created a service account to impersonate users in my organization in order to make changes to work items in the users’ name. I already added that service account to the group “Project Collection Service Accounts”, which has “Make requests on behalf of others” set to “Allow”. The service account has Visual Studio Subscription. I then used my code, which is working with our on-premise TFS, to execute the impersonation and I got an error 500 saying that “Access Denied: X needs the following