Azure web app configuration - azure-devops

I have been using azure PowerShell tasks to update my app settings in the portal for all the web apps and would like to know if there is any other way to do the same.
I don't want to make the changes in the config files alone. The changes have to be made in the azure portal as well.

There are a few third-party tools to accomplish this and avoid Powershell. Basically it takes your VSTS variables, and sets them in Azure. You install these as release tasks.
Azure WebApp Configuration task
Azure App Service: Set App settings

In current Azure stack you have two options.
For secured settings you should rather use "Azure Key Vault"
For Centralized app settings you should use "Azure App Configuration" which is in public preview.

Related

deploying azure function app via Azure DevOps - how is the app service and storage provisioned?

I need to deploy an azure function app via Azure DevOps.
If I deploy via visual studio, it asks me to create a publish profile, where storage is specified.
I'm unsure how this works however with DevOps.
I have a build pipeline that builds the (.net core) function app, but on the release, I'm unsure how to proceed.
The Microsoft documentation is quite poor in my opinion, so would appreciate any expertise.
Thanks!
You have to create the underlying infrastructure prior to deploying the Azure Function to it.
There are steps you could user here and have an inline script job/stage within your pipeline:
https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-cli-csharp?tabs=azure-cli%2Cin-process#create-supporting-azure-resources-for-your-function
Alternatively you could use an ARM template or terraform to provision the app service and storage account as required.
I've got a sample github actions deployment of a function which uses the inline script method here:
https://github.com/brettmillerb/testfunctionapp/blob/master/.github/workflows/main.yml

Run Azure DevOps extension in the background

Is it possible to run Azure DevOps Web extension when you open any azure devops page?
Probably, there is exists something like "type": "ms.vss-web.azure-load-action" that starts when you open Azure DevOps Website.
In common way, extension contribution runs in a certain scenarios, like - opening hub, opening context menu, etc. Can you run an extension contribution in global context - after azure devops website was opened?
PS. I'he already searched in the VSTS samples, extension points and azure devops extension samples
Thank you, have a nice day!
Unfortunately, extensions don't support "load action". We use extensions to enhance Azure DevOps and Team Foundation Server (TFS) with new web experiences, dashboard widgets, build tasks, and more. You may submit a user voice at website below:
https://developercommunity.visualstudio.com/content/idea/post.html?space=21

Setting Up TFS Aggregator CLI on Azure Function App

I'm trying to set up a new instance of Aggregator CLI as an Azure function app. I've created the app on Azure and think I've installed Aggregator CLI, but don't know how to save my Azure DevOps (formerly VSTS) Personal Access Token (PAT) to Aggregator in order for the app to authenticate against DevOps. To be clear, I am not trying to install the server plugin (which requires an on-prem instance of TFS) nor am I trying to configure the webhooks version (which has been deprecated).
What I've done so far
Created a new resource group on Azure
Created a function app on Azure with storage account and application insights
Created an Azure service principle
Assigned permissions to the Azure service principle
Downloaded FunctionRuntime.zip v0.9.8 from https://github.com/tfsaggregator/aggregator-cli/releases
Deployed the code to the function app
Created a PAT in Azure DevOps
Expected behaviour
I expect to be able to save the PAT to the Aggregator_VstsToken application setting on the function app, so that the app can authenticate against VSTS. Setup.md doesn't describe how to do this. I expect to see the application settings shown in this screenshot on the app.
Actual behaviour
There isn't an application setting called Aggregator_VstsToken on the function app. There aren't any other Aggregator-specific settings either.
Environment
Azure DevOps (VSTS) cloud
Azure Function App

How to integrate powerapps with azure devops

I am doing some research for Powerapps integration with Azure DevOps.
However there is limitated information for it.
It is possible to integrate powerapps inside a Task for AzureDevops?
Based on, that we have a .zip file with the Powerapp, and we want to create a Build and Release/Deploy for several environments.
Thank You.
It is possible to integrate powerapps inside a Task for AzureDevops?
Yes it is.
You can leverage the Solution concept of the Microsoft Power Platform and the Power Apps BuildTools (preview) extension for Azure DevOps.
Update 11/2020: This is now GA and called Power Platform Build Tools
I've written a complete step-by-step guide on this topic:
A Continuous Delivery Approach for No-Code Solutions in Microsoft’s Power Platform
Bottom line:
With this build tool, you can automatically check-in a Solution into source control and deploy it using a continuous delivery approach with the help of Azure DevOps. See the screenshot for a sample configuration of the Export and Import Solution Task.
It works for everything you can organize inside a Solution, e.g.:
Power Apps
Power Automate Flows
AI Builder Models
Common Data Service Entities
It is possible to integrate powerapps inside a Task for AzureDevops?
I am afraid there is no such Task integrate powerapps for AzureDevops at this moment.
If you want to integrate powerapps with azure devops, you can follow the guide step by step:
Microsoft Teams – Integration with Visual Studio Team Services using PowerApps.
Besides, AFAIK, PowerApps should not be "Build/Deployed" through Azure Devops.
When you are developing with PowerApps, there is no way to do Source
Control. There are no source files. The only artifact you can version
control is the .zip file that you can export.
And
In PowerApps, you don’t have to build your code. Any change you make
to the application is live for you to test it. In that way it is very
productive. To publish the application you just click on the publish
button and it is live.
Check this great blog: PowerApps From A DevOps Perspective for some more details.
Hope this helps.
Solutions are a way to package your components in a single zip file and use Powerapps build tools to import your solution on to a different environment or tenant.
It is still a an improvement from manually importing each app or environment variable and then import it on to target system, but it lacks what we call as automation of deployment.
To provide an eg, I will explain what I have done, and what still constitutes of a manual task:
I created an enterprise level app using powerapp canvas model. My app consumes data from around 20 APIs. These API calls are implemented in power automate.
We have 4 environments, dev, sit, uat and prod. Now I cant keep on importing flows in each environment and change their api URLs to point to the deployed environment. So I used environment variables for each environment which stores api URLs for each environment. This can be done under solution.
Under the same solution, I added my app. So now my solution has 2 things, my app and the environment variable which consists of api URLs.
I then use powerapps build tools to move this solution from dev to sit.
Steps: use build tools tasks to perform the following
Export solution
Unpack it in git
Pack it
Import the solution.
This successfully moves my solution to sit.
But the solution environment variable still points to the dev url.
So I have to override environment variables to store sit URLs.
This manual intervention to edit environment variable is as good as doing all the tasks manually.
This was the case when PowerApps was first announced; however, this is no longer the case.
While it is technically true that there is no actual code that would be managed and deployed with a PowerApp or Flow but that doesn't mean that you can not use the power of Azure DevOps. Additionally, when creating a PowerApp / flow you would also be creating entities and even Model Driven apps - and these uses solutions - which naturally work well to deplooy within Azure DevOps.
Microsoft is building out this whole construct to enable all these to deploy...
While the whole incorporation of PowerApps and flows into Solutions is not fully baked yet - they are targeting to have this ready around the October time frame this year.
We have been talking to Microsoft about also enabling PowerApps and flows to follow the same expansion that solutions do so that they can take advantage of the full branching strategy.
So even though you would be simply exporting out zip files into your repo - you can still take advantage of the full devops pipeline which is highly recommended.
Use this component, it still on preview mode but is working fine on my side
https://marketplace.visualstudio.com/items?itemName=microsoft-IsvExpTools.PowerApps-BuildTools

How to publish WebApp as Azure Virtual Application from TFS Release (vNext)

I need to publish 3 webapp to azure using release manager from TFS, and I need all of these 3 apps inside wwwroot subfolder:
wwwroot\app1
wwwroot\app2
wwwroot\app3
This is because I have a azure virtual application pointing to each of this folders.
I have a release for each app. Each app should deploy not to wwwroot, but to a folder inside wwwroot (app1, app2 or app3).
At this moment what I'm doing as a workaround is deploying a package (zip) with the name of the folder that I need (app1, app2 or app3), however, this is just a workaround, because if I activate "clean" in the release task, this clean all wwwroot folders and clean the other apps.
Is there anyway to deploy using some Task to a specific folder instead root folder (wwwroot)? Or, is there a way to deploy to azure virtual application?
If not, is it possible to send me a powershell command to delete a specific folder in the wwwroot?
I'm using "Azure Web App Deployment" task that uses Publish-AzureWebsiteProject PS command, but I don't know if it's possible to send some argument to send this to a specific folder inside wwwroot? Is there some argument to do that?
Thank you all for the availability
You could directly use the AzureRM Web App Deployment task released by Microsoft which allows for virtual directories.
Update
It's a build-in task called Azure APP Service Deploy
The task you are using-- Azure Web App Deployment is deprecated.
NOTE: This task has been deprecated. To update Azure App Services using Web Deploy or Kudu REST APIs, use the Azure App Service
Deploy task.
We recommend you replace the Azure Web App Deployment task with the
Azure App Service Deploy task in all your build or release
definitions.
I found another solution. Using cURL to upload by FTP and I can control each individual folder.
Anyway, if someone knows how to deploy directly to a virtual app directory, please provide answer :)
Thank you