azure-pipelines

.NetCore microservice CI pipeline Azure DevOps Build error @ docker image

爷,独闯天下 提交于 2020-02-06 07:30:19
问题 I am very much new on docker technology, I am getting the build error while creating the .Net Core 3.1 on Azure DevOps CI pipeline on Docker image tasks: Step 7/17 : COPY ["API2/API2.csproj", "API2/"] COPY failed: CreateFile \?\C:\ProgramData\docker\tmp\docker-builder021493529\API2\API2.csproj: The system cannot find the path specified. My default docker file is FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-nanoserver-1809 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com

VSTS build running locally - error: “Microsoft Internet Explorer. Enhanced Security Configuration”

一曲冷凌霜 提交于 2020-02-05 05:20:07
问题 I'm running Windows 10 and making a script to handle/start VSTS builds. Sample call (overriding properties for testing): $env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI = "https://mytenancy.visualstudio.com/" $env:SYSTEM_TEAMPROJECTID = "Project1" $env:SYSTEM_DEFINITIONID = 5 #$env:SYSTEM_ACCESSTOKEN = "mytoken" - uncomment when running locally $url = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECTID/_apis/build/definitions/$($env:SYSTEM_DEFINITIONID)?api-version=2.0" Write-Host

How to reference a variable within a variable in VSTS vNext build definition?

纵饮孤独 提交于 2020-02-04 01:39:34
问题 How is it possible to reference a variable within a variable in the new scripting system of VSTS? e.g: RemoteMachineFqdn: somemachinename.somedomain RemoteMachineUncPath: \\$(RemoteMachineFqdn)\c$\ In the aforementioned example, assume there are tasks that both use CMD and Powershell scripts with the given variables. I tried using the the variables by referencing their values from the environment but it does not work for both scenarios since %variable% works only in CMD and $env:variable -

Failed to use .NET SDK agent in Azure DevOps Build Pipeline

余生颓废 提交于 2020-02-03 10:59:06
问题 I have a ASP.NET Core 2.1 and added a nuget package of Microsoft.WindowsAzure.Storage , But after pushing the code to repo, the build pipeline occurs package error while running the build agent and is it necessary to add any other agents in build pipeline other than BUILD, RESTORE, TEST and PUBLISH. [error]Error: The process 'C:\hostedtoolcache\windows\dotnet\dotnet.exe' failed with exit code 1 Info: Azure Pipelines hosted agents have been updated to contain .Net Core 3.x SDK/Runtime along

Azure pipeline from Yaml hosted on Gitlab

我的未来我决定 提交于 2020-01-30 13:15:28
问题 I think it isn't possible to create an Azure Pipeline from Yaml when hosting the Git repository in GitLab. Is anyone able to confirm or deny this? I think it is possible for GitHub, BitBucket and Azure Repos Git. 回答1: You're right, according to the docs the YAML supported only in Azure Repos Git, Bitbucket Cloud, GitHub and GitHub Enterprise Server: 来源: https://stackoverflow.com/questions/58027480/azure-pipeline-from-yaml-hosted-on-gitlab

Git Clone generating an error in Azure Command Line Task

筅森魡賤 提交于 2020-01-30 08:51:04
问题 In my Azure DevOps CD pipeline, I have added a Command Line task which clones a Git repository. The clone is done successfully however there is an error in the log. The strange behavior is that the clone works perfectly with an Azure hosted agent (like vs2017-win2016 or windows-2019 ) but generates the error (see below screenshot) if I use a private local agent. Command Line Script: git config --global user.email "my@email.com" git config --global user.name "naregk" git clone -c http

Step references task InvokeRESTAPI at version 1.152.1 which is not valid for the given job target

梦想与她 提交于 2020-01-25 10:40:28
问题 I have an Azure pipeline which needs to send a REST request to an endpoint. I am trying to use the built in task InvokeRESTAPI@1 to do this, but it errors when running on Azure DevOps. Script: --- trigger: batch: true branches: include: - master pr: - master stages: - stage: Run_Tests jobs: - job: RA001 pool: windows-server steps: - task: InvokeRESTAPI@1 displayName: "Run Test" inputs: connectionType: 'connectedServiceName' serviceConnection: 'myconnection' method: 'PUT' headers: | {

Pull request pop up a confirmation box

故事扮演 提交于 2020-01-25 10:14:09
问题 During pull request my requirement is to set a branch policy so that I can pop up a custom dialog box which will ask the user if all systems tests were run on the incoming feature branch being merged. This will possibly be a free text or a radio button kind of interaction. Is it possible to do some such custom workflows during pull requests in Azure DevOps? Thanks 回答1: Is it possible to do some such custom workflows during pull requests in Azure DevOps? Of course yes! We provide a custom

Azure Pipelines - CI Trigger on feature branch doest work with YAML

☆樱花仙子☆ 提交于 2020-01-25 10:11:10
问题 CI doesn't trigger when I change anything in my feature/* branch. I configured a YAML on Azure pipeline - trigger: branches: include: - feature/* I also tried the other style of configuration - again unsuccessful trigger: - feature/* Also tried with the complete feature name like feature/my-feature However when I override the YAML trigger and use branch filters to point to the specific feature branch the CI works when I make changes in the branch. I followed this official documentation 回答1:

How to trigger Agent Job As per condition using PowerShell in Azure Devops Pipeline

余生颓废 提交于 2020-01-25 09:41:26
问题 I have a PowerShell as below: echo "Hello-World" $MyVariable = "Proceed" echo $MyVariable What I want to do : If the MyVariable is " Proceed " Only and only then Agent Job2 Should run I have used PowerShell task and Given Variable name as MyVariableOutput I have done below configuration at Agent Job2 level Can you please let me know how can I put these condition: Only If the Powershell Script at Agent Job1 Produce the Proceed as the value of MyVariable Agent Job2 will run. Note: Agent Job1