azure-pipelines

How do I set up different pipelines for each branch in Azure

半城伤御伤魂 提交于 2021-01-28 05:05:53
问题 I have a single project but with two "master" branches. master virt/master Each of them would have their own azure-pipeline.yml specific for their branch. The first pipeline in master has the trigger set up as trigger: batch: true branches: include: - refs/heads/master The second one is in the virt/master branch. trigger: batch: true branches: include: - refs/heads/virt/master Here's the repository that I am experimenting on https://dev.azure.com/trajano/experiments/_git/multi-branch master

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

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;

No test result files were found using search pattern '…\**\TEST-*.xml

那年仲夏 提交于 2021-01-27 21:27:25
问题 I am running my test in TFS (Nunit plus Visual Studio with Adapter) and I have set the build definition as below Build succeeds but no test result file was generated Does TFS writes this Xml file ? Log 2017-02-08T08:08:40.8151428Z Executing the powershell script: D:\A1\agent\tasks\PublishTestResults\1.0.20\PublishTestResults.ps1 2017-02-08T08:08:41.0963795Z ##[warning]No test result files were found using search pattern 'D:\A1_work\1\s**\TEST-*.xml'. 回答1: If the Nunit plus Visual Studio with

VSTS Nested Variables

帅比萌擦擦* 提交于 2021-01-27 20:04:01
问题 I'm trying to accomplish a cascading variable, where when one design time variable is set, it cascades to other variables. Is this possible? I've tried with dot notation, I've tried without dot notation, and I've tried to do it in the task: I also tried this task plugin, but my agents are on 2.0 and the task doesn't run. Variable Toolbox Task Any ideas? Answer: You can override these variables at the environment level. I will have to expand these variables in my script manually and then set

Azure DevOps yaml pipeline, downloaded artifact is empty

可紊 提交于 2021-01-27 16:45:25
问题 Converting a pipeline from classic to YAML (so I know it works). I build and my publish artifact task looks like this: - task: PublishPipelineArtifact@1 displayName: 'Publish Pipeline Artifact' inputs: targetPath: '$(Build.ArtifactStagingDirectory)/MyArtifact' artifact: MyArtifact The result when build looks like this: I then want to deploy this to a webapp YAML: - stage: Dev jobs: - job: DeployApp displayName: Deploy Web App pool: name: myPrivate demands: msbuild steps: - task:

how to restrict the access on build.yml file from developers in Azure DevOps repository

落爺英雄遲暮 提交于 2021-01-27 13:31:43
问题 In Azure DevOps we have created both build and release pipeline using classic way and now we are planning this to convert to yaml file. But it seems in yaml method, the code can be put only on the root of the repo, where we want to keep the build yaml files in a separate repo, where the developers won't have access. How can achieve this? 回答1: You can use templates, put in the main repo only the minimal yalm that refers to a template with all the steps, the template exits in another repo. For

Having no permission for updating Variable Group via Azure DevOps REST API from running Pipeline

馋奶兔 提交于 2021-01-27 13:25:52
问题 In a nutshell, I am trying to update a Variable Group when executing a PowerShell script from a build Pipeline (increasing a build number, but this part is not so important). As it suggested in this topic and Azure DevOps docs I use code similar to: $url = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECTID/_apis/build-release/definitions/$($env:SYSTEM_DEFINITIONID)?api-version=2.0" Write-Host "URL: $url" $pipeline = Invoke-RestMethod -Uri $url -Headers @{ Authorization =

Authentication Failure using Git-LFS Azure DevOps Pipeline

巧了我就是萌 提交于 2021-01-27 13:23:16
问题 I'm getting the following Authentication failure attempting to checkout a repository with git-lfs support in an Azure Devops Pipeline: ##[command]git -c http.<url>="AUTHORIZATION: bearer ***" lfs fetch origin 8d51d72484c1b19a2427ed9f7736d410e43a8a29 fetch: Fetching reference 8d51d72484c1b19a2427ed9f7736d410e43a8a29 fatal: could not read Password for '<url>': terminal prompts disabled batch response: Git credentials for <url> not found. error: failed to fetch some objects from '<url>/info/lfs'