About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
windows_first
⚠️
windows_tools
⚠️
powershell_heavy
Summary:
The documentation demonstrates a moderate Windows bias. Windows-based build agents (vmImage: 'windows-latest') are used by default or appear first in C# and PowerShell examples, while Linux (ubuntu-latest) is used for JavaScript and Python. PowerShell is included as a first-class language, but there is no mention of Bash or Linux shell scripting for administrative tasks. Windows is the default appType for deployment, and Windows-specific notes and terminology (such as 'windows-latest', 'functionApp' for Windows, and PowerShell language support) are presented before or more prominently than Linux equivalents. However, Linux deployment and build examples are present and reasonably complete, especially for Python and JavaScript.
Recommendations:
- For C# examples, provide both 'windows-latest' and 'ubuntu-latest' YAML build pipeline samples, or explain when to use each.
- For PowerShell, clarify that it is Windows-only and consider providing Bash equivalents for administrative or scripting tasks.
- In deployment sections, present Linux and Windows options side-by-side or in parallel tabs, rather than defaulting to Windows.
- Explicitly mention Linux support for C# and PowerShell if available, or clarify platform limitations.
- Where Windows is the default (e.g., appType), explain how to select Linux and highlight Linux as an equal option.
- Add a summary table or section comparing Windows and Linux support for each language and deployment scenario.
Create pull request
Flagged Code Snippets
pool:
vmImage: 'windows-latest'
steps:
- script: |
dotnet restore
dotnet build --configuration Release
- task: DotNetCoreCLI@2
inputs:
command: publish
arguments: '--configuration Release --output publish_output'
projects: '*.csproj'
publishWebProjects: false
modifyOutputPath: false
zipAfterPublish: false
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)/publish_output"
includeRootFolder: false
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
artifactName: 'drop'
pool:
vmImage: 'windows-latest'
steps:
- script: |
dotnet restore
dotnet build --configuration Release
- task: DotNetCoreCLI@2
inputs:
command: publish
arguments: '--configuration Release --output publish_output'
projects: '*.csproj'
publishWebProjects: false
modifyOutputPath: false
zipAfterPublish: false
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)/publish_output"
includeRootFolder: false
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
artifactName: 'drop'
pool:
vmImage: 'windows-latest'
steps:
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)"
includeRootFolder: false
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
artifactName: 'drop'
pool:
vmImage: 'windows-latest'
steps:
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)"
includeRootFolder: false
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
artifactName: 'drop'
trigger:
- main
variables:
# Azure service connection established during pipeline creation
azureSubscription: <SUBSCRIPTION_NAME>
appName: <APP_NAME>
# Agent VM image name
vmImageName: 'windows-latest'
- task: AzureFunctionApp@2 # Add this at the end of your file
inputs:
azureSubscription: <AZURE_SERVICE_CONNECTION>
appType: functionApp # this specifies a Windows-based function app
appName: $(appName)
package: $(System.ArtifactsDirectory)/**/*.zip
deploymentMethod: 'auto' # 'auto' | 'zipDeploy' | 'runFromPackage'. Required. Deployment method. Default: auto.
#Uncomment the next lines to deploy to a deployment slot
#Note that deployment slots is not supported for Linux Dynamic SKU
#deployToSlotOrASE: true
#resourceGroupName: '<RESOURCE_GROUP>'
#slotName: '<SLOT_NAME>'