Subscription is not populating in Azure Release Pipeline - azure

I have created Azure Build Pipeline and now want to create the Release Pipeline. On the release tab, I am unable to see any subscription whereas I do have subscription which I can use in the Portal.azure.com.
Please help.

Subscription is not populating in Azure Release Pipeline
There is no such Subscription in the Azure realease pipeline tab directly.
To use the subscription in the release pipeline, we need to create a service connection to connect the azure Portal via subscription:
Project Settings-> Service connections-> Azure Resource Manager:
Then we could use this connection for the task, like Azure CLI:

Related

Deploy azure subscription using azure devops pipeline

I'm trying to deploy a new azure subscription into a management group using azure devops pipeline.
I have created a management group and a service principle , I assign the contributor role on the mgm group to the sp and then created a new service connection on the management group scope.
My problem is that I can not find this service connection in my pipeline task.
How can I use this service connection in my pipeline to deploy subscription?
According to your description, you could add the "ARM Template deployment" task in the azure pipeline to deploy a new azure subscription into a management group.
In classic pipeline:
For more information about the ARM of the mangement group, you could refer to this documentation.

How to remove permission of azure devops pipeline from an Azure VM?

I deploy .net web app via azure pipelines onto IIS on an azure vm via the web deploy task.
To do this I had to initially configure the deployment group by running a script on the azure vm as explained here (see step 5): https://learn.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-webdeploy-iis-deploygroups?view=azure-devops&tabs=net#create-a-deployment-group
The project has completed and now I want to remove the permission of the pipeline to the azure vm. How to remove the permission of azure devops pipeline from an Azure VM?
The project has completed and now I want to remove the permission of the pipeline to the azure vm.
DevOps pipeline uses the account(when you setup agent, default is "nt authority\system") to access the agent.
You can uninstall the deployment group agent to remove the access:
Launch powershell,go to agent folder.
Run .\config.cmd remove to uninstall.
After it's done, it will remove the agent service and also VSTS group user below.
If you specify user not default, you can even directly delete the user from the machine to remove the permission.

azure DevOps - Service connection to Azure

I am trying to create a service connection to Azure with below steps:
1- I use same user for Azure and Azure DevOps
2- in the Project setting -> service connection -> new service connection
Azure resource Manager -> Service principal (Automatic)
but It can not find my subscription.
anybody has any idea?
Do you have Azure Active Directory level permissions? You will also need Owner level Subscription Permissions on the subscription as displayed in the documentation here. You can add a service connection manually, you don't have to use the automated process as per the docs here

Is it possible to failover Azure functions using a VSTS/Azure DevOps Release deployment task?

I have a timer triggered function that I'm looking to deploy in two different regions in an active-passive pattern. In disaster recovery scenario, I want to disable the active instance, then activate the passive instance in such a way that I can also keep record of this activity.
I know this can be done via powershell/Azure CLI, but I think doing this via Azure release pipelines should be better for auditing purposes. Does anyone know if this is doable?
I donot know much about Azure funtions. But there are azure powershell task and azure CLI task that you can use to run the scripts in azure release pipeline, Since it can be done via powershell/Azure CLI.
In order to run the powershell/Azure CLI scripts in azure release pipeline. You need first connect your azure devops to your Microsoft Azure subscription via service connection. Check here to create a service connection in azure devops. This service connection is needed for azureSubscription parameter of azure powershell task/azure cli task
Then you can create a release pipeline and add azure powershell task or azure cli task to run the scripts.

Copy files to Azure Blob storage in different suscriptions with Azure DevOps

I have an Azure DevOps Release who in one of its tasks have to copy files from Azure Repo to Blob Storage. I use Azure file copy task and it works perfectly if blob storage is in the same Azure subscription who is included to Azure DevOps. But in one of the stages I have to deploy to a different Azure subscription and in this scenario, the task fails and I get an error without information:
2019-02-25T07:50:33.9773339Z ##[error]Upload to container: 'containerName' in storage account: 'storageAccountName' with blob prefix: '' failed with error: '' For more info please refer to https://aka.ms/azurefilecopyreadme
I think is because of permissions, but I don't know how to configure.
Any idea?
But in one of the stages I have to deploy to a different Azure subscription and in this scenario.
If you want to copy the file to Azure storage in a different Azure subscription, you need to creat an Azure service connection string. Then you could choose the corresponding subscription from Azure Subscription dropdown list.
For detail steps how to create an Azure Resource Manager service connection, please refer to the official document.
Note: Don't forget to assign role to the service principal.

Resources