azure-pipelines

Checking for null object type parameter in Azure YAML

ぃ、小莉子 提交于 2020-05-13 14:51:06
问题 I'm setting up a build template and can't figure out the syntax for an optional object type parameter. In my pipeline I'm calling the template like this: stages: - template: aspnet-core.yml@templates parameters: database: name: 'SomeDatabase' server: 'SomeServer' I have the parameter defined like this in the template: parameters: database: null I want to do a check like this in the template so I can run a task conditionally: - ${{ if ne('${{ parameters.database }}', null) }}: However, it's

Approve a yaml pipeline deployment in Azure DevOps using REST api

◇◆丶佛笑我妖孽 提交于 2020-05-13 09:30:37
问题 I'm using the new multi-stage pipelines in Azure DevOps to manage deployments to Azure environments. I setup the corresponding Environments in Azure DevOps so that we can explicitly approve the actual deployments for each system. We want to provide a custom web view to monitor the deployments and approve them . I couldn't find any online docs for the REST api of the new pipelines and environments. So far I can only trigger the releases but I need to approve the deployments from the Azure

Approve a yaml pipeline deployment in Azure DevOps using REST api

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-13 09:30:09
问题 I'm using the new multi-stage pipelines in Azure DevOps to manage deployments to Azure environments. I setup the corresponding Environments in Azure DevOps so that we can explicitly approve the actual deployments for each system. We want to provide a custom web view to monitor the deployments and approve them . I couldn't find any online docs for the REST api of the new pipelines and environments. So far I can only trigger the releases but I need to approve the deployments from the Azure

How can I cancel all previous build when a new one is queued?

无人久伴 提交于 2020-05-13 07:20:29
问题 With Azure DevOps how can I cancel the current build when a new one is started? I want to save my build time. On my master branch sometime I do a merge then another developer do one and another do one again. I don't need to do build by build. I can keep only the latest build. So when a new build is queued this one can cancel all previous build. Is it possible to setup his build definition to do so? 回答1: There is no such feature in Azure DevOps. The closest thing it's to use "Batching CI

How can I cancel all previous build when a new one is queued?

折月煮酒 提交于 2020-05-13 07:20:07
问题 With Azure DevOps how can I cancel the current build when a new one is started? I want to save my build time. On my master branch sometime I do a merge then another developer do one and another do one again. I don't need to do build by build. I can keep only the latest build. So when a new build is queued this one can cancel all previous build. Is it possible to setup his build definition to do so? 回答1: There is no such feature in Azure DevOps. The closest thing it's to use "Batching CI

How can a script access Service Connections? (Azure Devops Pipelines)

空扰寡人 提交于 2020-05-12 11:25:49
问题 According to https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints there's a rich array of Service Connection types. I can easily manage a set of service connections at the project level and set permissions to limit which users are able to view/edit them -- this is all good. But I can't figure out how to access a Service Connection with a script step in my build pipeline. For example, let's say I have a Service Connection representing credentials for an Azure

Use new Deployment Job in Azure DevOps. Can't find artifacts

拜拜、爱过 提交于 2020-05-11 06:35:20
问题 I need to deploy an Asp.Net Core Application to Azure WebApp using Azure Devops. I have the following working Azure-Pipelines YAML file: trigger: - master variables: buildConfiguration: 'Release' buildPlatform: 'any cpu' version: '0.2.0' stages: - stage: 'Stage1' jobs: # Previous Jobs like Build, Test, ... - job: 'Publish' pool: vmImage: 'Ubuntu-16.04' dependsOn: 'Test' steps: - task: DotNetCoreCLI@2 displayName: 'Publish' inputs: command: publish publishWebProjects: false projects: '**/*

Azure DevOps pipeline release Error: No package found with specified pattern: D:\a\r1\a\**\*.zip

こ雲淡風輕ζ 提交于 2020-05-10 07:13:16
问题 I have an ASP.NET Core project in Azure DevOps repository and it gets built OK using the DevOps build pipeline. However, the release over that builds always fails with this error: Error: No package found with specified pattern: D:\a\r1\a***.zip I've already checked out this and this Q/As, but cannot figure out the solution. Here is my azure.pipelines.yml file: pool: vmImage: 'vs2017-win2016' variables: buildConfiguration: 'Release' steps: - script: dotnet build ".\src\MyProject.sln" -

.Net Core 3.1 not yet supported in Azure Pipelines hosted agents? Getting NETSDK1045

泄露秘密 提交于 2020-05-10 04:09:14
问题 It's great that .Net Core 3.1 is out, but I'm not sure the Azure Pipelines hosted agents have caught up. My YAML pipeline specifies: pool: vmImage: 'windows-latest' and the dotnet restore step does this: (_CheckForUnsupportedNETCoreVersion target) -> C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(127,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 3.0 or lower, or

How to publish artifacts separately for each project in solution from VSTS CI pipeline?

感情迁移 提交于 2020-05-09 21:39:28
问题 In my solution, I have two projects (a Asp.net MVC and a Windows Service). I want to create CI/CD pipeline to deploy web application and windows service on different VMs. But to achieve this my CI pipeline should be able to publish artifacts separately for both project and then I can feed these artifacts in CD pipeline for deployment. How artifacts for all projects can be published separately in a CI pipeline ? PS: If I create two solutions each with one project only and create CI/CD pipeline