azure-devops

What permissions does an Azure service principal need to call the New-AzSubscriptionAlias PowerShell function?

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 06:43:54
问题 I'm trying to create subscriptions through an Azure DevOps pipeline on a hosted agent running as a service principal and am receiving the error: New-AzSubscriptionAlias: /home/vsts/work/1/s/Azure.Automation/Subscriptions/Create-AzureSubscription.ps1:190 Line | 190 | $subscription = New-AzSubscriptionAlias ` | ~~~~~~~~~~~~~~~~~~~~~~~~~ | Operation returned an invalid status code 'Unauthorized' How do I grant the service principal the required access? 回答1: As it is written here in

How to setup generic stage pipeline for all environments?

送分小仙女□ 提交于 2021-01-29 06:43:38
问题 I have multiple artifacts for each branch. Continuous deployment trigger is enabled For Dev: _CI_Dev For QA: _CI_QA For Staging: _CI_RC I want to setup a common stage (since the tasks are same across environments) which should identify the source branch and use corresponding artifacts. How to add approval and gates only for QA and staging? How do I identify the source branch which triggered the tasks (for a job)? Should I run a powershell script to setup source branch value in variable to be

Azure DevOps - Handling single release for separate code repositories for UI and Dotnet API layer

筅森魡賤 提交于 2021-01-29 06:38:40
问题 I have separate existing code repositories- One for Angular UI and one for .NET 4.7 API layer. In the manual process, The compiled UI code is placed in wwwroot folder after dotnet publish is executed, and the artifacts are deployed to an Azure App service. While trying to implement CI using Azure DevOps, I had to create two build pipelines for UI and BackEnd. In the release pipeline, it looks like I have to unzip the artifacts, write a copy step to UI artifacts into wwwroot and then again zip

How to use Docker Host Service Connection in Azure Pipelines

人走茶凉 提交于 2021-01-29 06:14:20
问题 I created a Docker Host Service Connection in Azure Devops Services. But I can't see how I can refer to that service connection from the azure-pipeline.yml file. Can someone help? 回答1: How to use Docker Host Service Connection in Azure Pipelines I am afraid that this should be a legacy of a unpublished task Docker Integration. Because this task is in an unpublished state at this time, we cannot use it. If necessary, it is recommended to use docker and Docker Compose tasks. That the reason why

How to set height of iframe embedded in VSTS hub

强颜欢笑 提交于 2021-01-29 05:42:57
问题 I have created a VSTS extension, follow a guide of add a hub. My extension will hold a iframe that render my website for my own job. i can show, but the height of the content in iframe of devops is very short. Here is my markup and code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="sdk/scripts/VSS.SDK.min.js"></script> <title>embedded iframe</title> </head> <body> <script type="text/javascript"> VSS.init(); VSS.ready(function () { var assetFrame = document

Azure Devops: Fail to get artifact content zip with TFS Client lib

孤者浪人 提交于 2021-01-29 05:21:53
问题 I want to download an artifact with Azure DevOps Services API. While programing with C#, I choose to use Microsoft.TeamFoundationServer.Client SDK, Version: 16.153.0 as a tool. I am sure I have the artifact. But After I use BuildHttpClient::GetArtifactContentZipAsync(project: "XXX", buildId: buildid, artifactName: "XXX") to get zip stream. I get exception with a message like : The requested version \"5.1\" of the resource is under preview. The -preview flag must be supplied in the api-version

vsts phase conditions: How to continue with next phase?

这一生的挚爱 提交于 2021-01-29 05:17:06
问题 I have a build steps like: - ... - npm install - npm start sb:server (start http-server to serve static files) - npm run e2e By the npm start sb:server; it starts the server and it hangs... and doesn't go the next phase which is npm run e2e. I would like to add a condition to npm run e2e that it should just start without looking previous phase state (failed or succeeded). I have checked the https://docs.microsoft.com/en-us/vsts/pipelines/process/conditions?view=vsts#job-status-functions I can

Is it possible to do swap, start, stop slots in cloud service classic, on azure devops?

给你一囗甜甜゛ 提交于 2021-01-29 03:10:42
问题 I do ci/cd to Cloud Service(classic) with azure devops . I have steps like start or stop and swap slots in this Cloud Service. I thought I can use PowerShell for these goals. In the beginning, I tried Azure PowerShell job. Unfortunately, I have not found the required commands in Az and azureRM modules. So I decided to use just PowerShell job, where I install the Azure module and I want to use these commands Start-AzureService and Stop-AzureService . Is it the right way? Or is there something

Azure Data Flow creating / managing keys for identity relationships

微笑、不失礼 提交于 2021-01-29 02:04:16
问题 Curious to find out what the best way is to generate relationship identities through ADF. Right now, I'm consuming JSON data that does not have any identity information. This data is then transformed into multiple database sink tables with relationships (1..n, etc.). Due to FK constraints on some of the destination sink tables, these relationships need to be "built up" one at a time. This approach seems a bit kludgy, so I'm looking to see if there are other options that I'm not aware of. Note

How to get build status updated in Bitbucket from Azure Pipeline?

谁说我不能喝 提交于 2021-01-29 01:39:15
问题 I am using Azure Pipeline to build and run test for iOS code. Those steps works fine. How to display the build status in bitbucket? I could find a script: #!/usr/bin/env python import os import requests # Use environment variables that your CI server provides to the key, name, # and url parameters, as well as commit hash. (The values below are used by # Jenkins.) data = { 'key': os.getenv('BUILD_ID'), 'state': 'SUCCESSFUL', # or 'FAILED' for a script that runs when the build fails 'name': os