AzureRmWebAppDeployment@3- Azure App Service v3-taak implementeren

Gebruik deze taak om te implementeren om een web-, mobiele of API-app te Azure App Service met behulp van Docker, Java, .NET, .NET Core, Node.js, PHP, Python of Ruby.

Notitie

Gebruik AzureFunctionApp@1 om Azure Functions apps te implementeren.

Werk Azure-app Services in Windows, Web App on Linux bij met ingebouwde installatiekopieën of Docker-containers, ASP.NET, .NET Core, PHP, Python of webtoepassingen op basis van Node.js, functie-apps, mobile apps, API-toepassingen en webtaken met behulp van Web Deploy/Kudu REST API's.

Syntax

# Azure App Service deploy v3
# Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby.
- task: AzureRmWebAppDeployment@3
  inputs:
    azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription. 
    appType: 'app' # 'app' | 'applinux' | 'functionapp' | 'api' | 'mobileapp'. Alias: WebAppKind. Required. App type. Default: app.
    WebAppName: # string. Required. App Service name. 
    #DeployToSlotFlag: false # boolean. Optional. Use when WebAppKind != "". Deploy to slot. Default: false.
    #ResourceGroupName: # string. Required when DeployToSlotFlag = true. Resource group. 
    #SlotName: # string. Required when DeployToSlotFlag = true. Slot. 
    #ImageSource: 'Registry' # 'Registry' | 'Builtin'. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Image Source. Default: Registry.
    #AzureContainerRegistry: # string. Required when ImageSource = AzureContainerRegistry. Registry. 
    #AzureContainerRegistryLoginServer: # string. Optional. Use when ImageSource = invalidimagesource. Registry Login Server Name. 
    #AzureContainerRegistryImage: # string. Required when ImageSource = AzureContainerRegistry. Image. 
    #AzureContainerRegistryTag: # string. Optional. Use when ImageSource = AzureContainerRegistry. Tag. 
    #DockerRepositoryAccess: 'public' # 'private' | 'public'. Required when ImageSource = invalidImage. Repository Access. Default: public.
    #dockerRegistryConnection: # string. Alias: RegistryConnectedServiceName. Required when DockerRepositoryAccess = private || ImageSource = PrivateRegistry. Registry Connection. 
    #PrivateRegistryImage: # string. Required when ImageSource = PrivateRegistry. Image. 
    #PrivateRegistryTag: # string. Optional. Use when ImageSource = PrivateRegistry. Tag. 
    #DockerNamespace: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource  = Registry. Registry or Namespace. 
    #DockerRepository: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource  = Registry. Image. 
    #DockerImageTag: # string. Optional. Use when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource  = Registry. Tag. 
    #VirtualApplication: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Virtual application. 
    #Package: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Required when WebAppKind != linux && WebAppKind != applinux &&  WebAppKind != "". Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: BuiltinLinuxPackage. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #RuntimeStack: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Runtime Stack. 
    #StartupCommand: # string. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Startup command. 
  # Output
    #WebAppUri: # string. Optional. Use when WebAppKind != "". App Service URL. 
  # Post Deployment Action
    #ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when WebAppKind != "". Deployment script type. 
    #InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && WebAppKind != "". Inline Script. Default: :: You can provide your deployment commands here. One command per line..
    #ScriptPath: # string. Required when ScriptType == File Path && WebAppKind != "". Deployment script path. 
  # File Transforms & Variable Substitution Options
    #GenerateWebConfig: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Generate Web.config. Default: false.
    #WebConfigParameters: # string. Required when GenerateWebConfig == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Web.config parameters. 
    #enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML transformation. Default: false.
    #enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML variable substitution. Default: false.
    #JSONFiles: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. JSON variable substitution. 
  # Application and Configuration Settings
    #AppSettings: # string. App settings. 
    #ConfigurationSettings: # string. Configuration settings. 
  # Additional Deployment Options
    #TakeAppOfflineFlag: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Take App Offline. Default: false.
    #UseWebDeploy: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Publish using Web Deploy. Default: false.
    #SetParametersFile: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". SetParameters file. 
    #RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Remove additional files at destination. Default: false.
    #ExcludeFilesFromAppDataFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Exclude files from the App_Data folder. Default: false.
    #AdditionalArguments: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Additional arguments. 
    #RenameFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Rename locked files. Default: false.
# Azure App Service Deploy v3
# Update Azure App Services on Windows, Web App on Linux with built-in images or Docker containers, ASP.NET, .NET Core, PHP, Python or Node.js based Web applications, Function Apps, Mobile Apps, API applications, Web Jobs using Web Deploy / Kudu REST APIs.
- task: AzureRmWebAppDeployment@3
  inputs:
    azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription. 
    appType: 'app' # 'app' | 'applinux' | 'functionapp' | 'api' | 'mobileapp'. Alias: WebAppKind. Required. App type. Default: app.
    WebAppName: # string. Required. App Service name. 
    #DeployToSlotFlag: false # boolean. Optional. Use when WebAppKind != "". Deploy to slot. Default: false.
    #ResourceGroupName: # string. Required when DeployToSlotFlag = true. Resource group. 
    #SlotName: # string. Required when DeployToSlotFlag = true. Slot. 
    #ImageSource: 'Registry' # 'Registry' | 'Builtin'. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Image Source. Default: Registry.
    #AzureContainerRegistry: # string. Required when ImageSource = AzureContainerRegistry. Registry. 
    #AzureContainerRegistryLoginServer: # string. Optional. Use when ImageSource = invalidimagesource. Registry Login Server Name. 
    #AzureContainerRegistryImage: # string. Required when ImageSource = AzureContainerRegistry. Image. 
    #AzureContainerRegistryTag: # string. Optional. Use when ImageSource = AzureContainerRegistry. Tag. 
    #DockerRepositoryAccess: 'public' # 'private' | 'public'. Required when ImageSource = invalidImage. Repository Access. Default: public.
    #dockerRegistryConnection: # string. Alias: RegistryConnectedServiceName. Required when DockerRepositoryAccess = private || ImageSource = PrivateRegistry. Registry Connection. 
    #PrivateRegistryImage: # string. Required when ImageSource = PrivateRegistry. Image. 
    #PrivateRegistryTag: # string. Optional. Use when ImageSource = PrivateRegistry. Tag. 
    #DockerNamespace: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource  = Registry. Registry or Namespace. 
    #DockerRepository: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource  = Registry. Image. 
    #DockerImageTag: # string. Optional. Use when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource  = Registry. Tag. 
    #VirtualApplication: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Virtual application. 
    #Package: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Required when WebAppKind != linux && WebAppKind != applinux &&  WebAppKind != "". Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #packageForLinux: '$(System.DefaultWorkingDirectory)/**/*.zip' # string. Alias: BuiltinLinuxPackage. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Package or folder. Default: $(System.DefaultWorkingDirectory)/**/*.zip.
    #RuntimeStack: # string. Required when WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Runtime Stack. 
    #StartupCommand: # string. Optional. Use when WebAppKind = applinux || WebAppKind = linux. Startup command. 
  # Output
    #WebAppUri: # string. Optional. Use when WebAppKind != "". App Service URL. 
  # Post Deployment Action
    #ScriptType: # 'Inline Script' | 'File Path'. Optional. Use when WebAppKind != "". Deployment script type. 
    #InlineScript: ':: You can provide your deployment commands here. One command per line.' # string. Required when ScriptType == Inline Script && WebAppKind != "". Inline Script. Default: :: You can provide your deployment commands here. One command per line..
    #ScriptPath: # string. Required when ScriptType == File Path && WebAppKind != "". Deployment script path. 
  # File Transforms & Variable Substitution Options
    #GenerateWebConfig: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Generate Web.config. Default: false.
    #WebConfigParameters: # string. Required when GenerateWebConfig == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Web.config parameters. 
    #enableXmlTransform: false # boolean. Alias: XmlTransformation. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML transformation. Default: false.
    #enableXmlVariableSubstitution: false # boolean. Alias: XmlVariableSubstitution. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. XML variable substitution. Default: false.
    #JSONFiles: # string. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. JSON variable substitution. 
  # Application and Configuration Settings
    #AppSettings: # string. App settings. 
    #ConfigurationSettings: # string. Configuration settings. 
  # Additional Deployment Options
    #TakeAppOfflineFlag: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Take App Offline. Default: false.
    #UseWebDeploy: false # boolean. Optional. Use when WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Publish using Web Deploy. Default: false.
    #SetParametersFile: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". SetParameters file. 
    #RemoveAdditionalFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Remove additional files at destination. Default: false.
    #ExcludeFilesFromAppDataFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Exclude files from the App_Data folder. Default: false.
    #AdditionalArguments: # string. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Additional arguments. 
    #RenameFilesFlag: false # boolean. Optional. Use when UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Rename locked files. Default: false.

Invoerwaarden

azureSubscription - Azure-abonnement
Invoeralias: ConnectedServiceName. string. Vereist.

Geef het Azure Resource Manager-abonnement op voor de implementatie.


appType - App-type
Invoeralias: WebAppKind. string. Vereist. Toegestane waarden: app (web-app), applinux (Linux-web-app), functionapp (functie-app (niet aanbevolen, gebruik Azure Functions taak)), api (API-app), mobileapp (mobiele app). Standaardwaarde: app.

Geef het type web-app op dat moet worden geïmplementeerd.

Opmerking: Geef Linux-web-app op voor ingebouwde platforminstallatiekopieën of implementaties van aangepaste containerinstallatiekopieën.


appType - App-type
Invoeralias: WebAppKind. string. Vereist. Toegestane waarden: app (web-app), applinux (Linux-web-app), functionapp (functie-app), api (API-app), mobileapp (mobiele app). Standaardwaarde: app.

Geef het type web-app op dat moet worden geïmplementeerd.

Opmerking: Geef Linux-web-app op voor ingebouwde platforminstallatiekopieën of implementaties van aangepaste containerinstallatiekopieën.


WebAppName - App Service naam
string. Vereist.

Geef de naam op van een bestaande Azure App Service. App-services op basis van het geselecteerde app-type worden alleen weergegeven wanneer u de taak gebruikt assistent.


DeployToSlotFlag - Implementeren naar site
boolean. Optioneel. Gebruik wanneer WebAppKind != "". Standaardwaarde: false.

Gebruik deze optie om te implementeren naar een andere bestaande site dan de productiesite. Als deze optie niet is geselecteerd, wordt de Azure App Service geïmplementeerd in de productiesite.


ResourceGroupName - Resourcegroep
string. Vereist wanneer DeployToSlotFlag = true.

Geef de Azure-resourcegroep op die de hierboven opgegeven Azure App Service bevat.


SlotName - Sleuf
string. Vereist wanneer DeployToSlotFlag = true.

Geef een andere bestaande site op dan de productiesite.


ImageSource - Afbeeldingsbron
string. Optioneel. Gebruik wanneer WebAppKind = applinux || WebAppKind = linux. Toegestane waarden: Registry (Container Registry), Builtin (ingebouwde installatiekopieën). Standaardwaarde: Registry.

App Service op Linux biedt twee verschillende opties om uw toepassing te publiceren:

Implementatie van aangepaste installatiekopieën of app-implementatie met een ingebouwde platforminstallatiekopieën.


AzureContainerRegistry - Register
string. Vereist wanneer ImageSource = AzureContainerRegistry.

Een wereldwijd unieke domeinnaam op het hoogste niveau voor uw specifieke register.

Opmerking: een volledig gekwalificeerde afbeeldingsnaam heeft de volgende indeling: <registry>/<repository>:<tag>. Bijvoorbeeld myregistry.azurecr.io/nginx:latest.


AzureContainerRegistryLoginServer - Naam van aanmeldingsserver voor register
string. Optioneel. Gebruik wanneer ImageSource = invalidimagesource.

Geef de naam van de aanmeldingsserver van een Azure-containerregister op.


AzureContainerRegistryImage - Afbeelding
string. Vereist wanneer ImageSource = AzureContainerRegistry.

De naam van de opslagplaats waar de containerinstallatiekopieën worden opgeslagen.

Opmerking: een volledig gekwalificeerde afbeeldingsnaam heeft de volgende indeling: <registry>/<repository>:<tag>. Bijvoorbeeldmyregistry.azurecr.io/nginx: :.latest


AzureContainerRegistryTag - Tag
string. Optioneel. Gebruik wanneer ImageSource = AzureContainerRegistry.

Dit is het mechanisme dat registers gebruiken om Docker-installatiekopieën een versie te geven.

Opmerking: een volledig gekwalificeerde afbeeldingsnaam heeft de volgende indeling: <registry>/<repository>:<tag>. Bijvoorbeeldmyregistry.azurecr.io/nginx: :.latest


DockerRepositoryAccess - Toegang tot opslagplaats
string. Vereist wanneer ImageSource = invalidImage. Toegestane waarden: private, public. Standaardwaarde: public.

Geef de toegang tot de Docker-opslagplaats op.


dockerRegistryConnection - Registerverbinding
Invoeralias: RegistryConnectedServiceName. string. Vereist wanneer DockerRepositoryAccess = private || ImageSource = PrivateRegistry.

Geef de registerverbinding op.


PrivateRegistryImage - Afbeelding
string. Vereist wanneer ImageSource = PrivateRegistry.

De naam van de opslagplaats waar de containerinstallatiekopieën worden opgeslagen.

Opmerking: een volledig gekwalificeerde afbeeldingsnaam heeft de volgende indeling: <registry><repository>:<tag>. Bijvoorbeeldmyregistry.azurecr.io/nginx: :.latest


PrivateRegistryTag - Tag
string. Optioneel. Gebruik wanneer ImageSource = PrivateRegistry.

Tags zijn het mechanisme dat registers gebruiken om Docker-installatiekopieën een versie te geven.

Opmerking: een volledig gekwalificeerde afbeeldingsnaam heeft de volgende indeling: '<registry>/<repository>:<tag>'. Bijvoorbeeldmyregistry.azurecr.io/nginx: :.latest


DockerNamespace - Register of naamruimte
string. Vereist wanneer WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry.

Een wereldwijd unieke domeinnaam op het hoogste niveau voor uw specifieke register of naamruimte.

Opmerking: een volledig gekwalificeerde afbeeldingsnaam heeft de volgende indeling: <registry or namespace>/<repository>:<tag>. Bijvoorbeeldmyregistry.azurecr.io/nginx: :.latest


DockerRepository - Afbeelding
string. Vereist wanneer WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry.

De naam van de opslagplaats waar de containerinstallatiekopieën worden opgeslagen.

Opmerking: de volledig gekwalificeerde naam van de installatiekopieën heeft de volgende indeling: '<registry or namespace>/<repository>:.<tag> Bijvoorbeeldmyregistry.azurecr.io/nginx: :.latest


DockerImageTag - Tag
string. Optioneel. Gebruik wanneer WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Registry.

Dit is het mechanisme dat registers gebruiken om Docker-installatiekopieën een versie te geven.

Opmerking: een volledig gekwalificeerde afbeeldingsnaam heeft de volgende indeling: '<registry or namespace>/<repository>:<tag>'. Bijvoorbeeldmyregistry.azurecr.io/nginx: :.latest


VirtualApplication - Virtuele toepassing
string. Optioneel. Gebruik wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "".

Geef de naam op van de virtuele toepassing die is geconfigureerd in de Azure Portal. De optie is niet vereist voor implementaties naar de App Service root.


Package - Pakket of map
string. Vereist wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Standaardwaarde: $(System.DefaultWorkingDirectory)/**/*.zip.

Het bestandspad naar het pakket of een map met app-service-inhoud die is gegenereerd door MSBuild of een gecomprimeerd zip- of war-bestand.

Variabelen zijn Build en Release. Jokertekens worden ondersteund.

Bijvoorbeeld $(System.DefaultWorkingDirectory)/\*\*/\*.zip of $(System.DefaultWorkingDirectory)/\*\*/\*.war.


packageForLinux - Pakket of map
Invoeralias: BuiltinLinuxPackage. string. Vereist wanneer WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin. Standaardwaarde: $(System.DefaultWorkingDirectory)/**/*.zip.

Het bestandspad naar het pakket of een map met app-service-inhoud die is gegenereerd door MSBuild of een gecomprimeerd zip- of war-bestand.

Variabelen zijn Build en Release. Jokertekens worden ondersteund.

Bijvoorbeeld $(System.DefaultWorkingDirectory)/\*\*/\*.zip of $(System.DefaultWorkingDirectory)/\*\*/\*.war.


RuntimeStack - Runtimestack
string. Vereist wanneer WebAppKind != app && WebAppKind != functionapp && WebAppKind != api && WebAppKind != mobileapp && ImageSource = Builtin.

Geef het framework en de versie op.


StartupCommand - Opstartopdracht
string. Optioneel. Gebruik wanneer WebAppKind = applinux || WebAppKind = linux.

Geef de opstartopdracht op.


WebAppUri - URL van App Service
string. Optioneel. Gebruik wanneer WebAppKind != "".

Geef een naam op voor de uitvoervariabele die wordt gegenereerd voor de URL van de Azure App Service. De variabele kan worden gebruikt in volgende taken.


ScriptType - Type implementatiescript
string. Optioneel. Gebruik wanneer WebAppKind != "". Toegestane waarden: Inline Script, File Path (scriptbestandspad).

Hiermee past u de implementatie aan door een script op te geven dat wordt uitgevoerd op de Azure-app-service zodra de taak de implementatie heeft voltooid. Hiermee kunnen bijvoorbeeld pakketten voor Node-, PHP- en Python-toepassingen worden hersteld. Meer informatie over Azure App Service-implementatie.


InlineScript - Inlinescript
string. Vereist wanneer ScriptType == Inline Script && WebAppKind != "". Standaardwaarde: :: You can provide your deployment commands here. One command per line..


ScriptPath - Pad naar implementatiescript
string. Vereist wanneer ScriptType == File Path && WebAppKind != "".


GenerateWebConfig - Web.configgenereren
boolean. Optioneel. Gebruik wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Standaardwaarde: false.

Er wordt een standaard Web.config gegenereerd en geïmplementeerd op Azure App Service als de toepassing er geen heeft. De waarden in web.config kunnen worden bewerkt en variëren op basis van het toepassingsframework. Voor de node.js toepassing web.config heeft bijvoorbeeld opstartbestand- en iis_node modulewaarden. Meer informatie over Azure App Service-implementatie.


WebConfigParameters - Web.config parameters
string. Vereist wanneer GenerateWebConfig == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war.

Hiermee worden waarden zoals opstartbestanden in het gegenereerde bestand bewerkt web.config . Deze bewerkingsfunctie is alleen voor de gegenereerde web.config. Meer informatie over Azure App Service-implementatie.


AppSettings - App-instellingen
string.

Hiermee worden web-app-toepassingsinstellingen bewerkt volgens de syntaxis -sleutelwaarde . Waarden die spaties bevatten, moeten tussen dubbele aanhalingstekens worden geplaatst. Voorbeelden: -Port 5000-RequestTimeout 5000-WEBSITE_TIME_ZONE"Eastern Standard Time".


ConfigurationSettings - Configuratie-instellingen
string.

Hiermee worden configuratie-instellingen voor web-apps bewerkt volgens de syntaxiswaarde -key . Waarden die spaties bevatten, moeten tussen dubbele aanhalingstekens worden geplaatst.

Voorbeelden: -phpVersion 5.6-linuxFxVersion: node|6.11.


TakeAppOfflineFlag - App offline halen
boolean. Optioneel. Gebruik wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Standaardwaarde: false.

Gebruik deze optie om de Azure App Service offline te halen door een app_offline.htm bestand in de hoofdmap van de App Service te plaatsen voordat de synchronisatiebewerking begint. Het bestand wordt verwijderd nadat de synchronisatiebewerking is voltooid.


UseWebDeploy - Publiceren met behulp van Web Deploy
boolean. Optioneel. Gebruik wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Standaardwaarde: false.

Publish using Web Deploy -opties worden alleen ondersteund wanneer u Windows-agent gebruikt. Op andere platforms is de taak afhankelijk van Kudu REST API's om de Azure App Service te implementeren. De volgende opties worden niet ondersteund.


SetParametersFile - SetParameters-bestand
string. Optioneel. Gebruik wanneer UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "".

De locatie van het SetParameters.xml bestand dat moet worden gebruikt.


RemoveAdditionalFilesFlag - Extra bestanden op bestemming verwijderen
boolean. Optioneel. Gebruik wanneer UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Standaardwaarde: false.

Gebruik deze optie om bestanden op de Azure App Service te verwijderen die geen overeenkomende bestanden hebben in het pakket of de map App Service.

Opmerking: hiermee worden ook alle bestanden verwijderd die betrekking hebben op een extensie die op deze Azure App Service is geïnstalleerd. Schakel het Exclude files from App_Data folder selectievakje in om dit te voorkomen.


ExcludeFilesFromAppDataFlag - Bestanden uitsluiten van de map App_Data
boolean. Optioneel. Gebruik wanneer UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Standaardwaarde: false.

Gebruik deze optie om te voorkomen dat bestanden in de App_Data map worden geïmplementeerd naar/verwijderd uit de Azure App Service.


AdditionalArguments - Aanvullende argumenten
string. Optioneel. Gebruik wanneer UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "".

De extra Web Deploy-argumenten na de syntaxis -key:value.

Deze worden toegepast bij het implementeren van de Azure App Service. Voorbeelden: -disableLink:AppPoolExtension-disableLink:ContentExtension.

Bekijk meer voorbeelden van instellingen voor web-implementatiebewerkingen.


RenameFilesFlag - Naam van vergrendelde bestanden wijzigen
boolean. Optioneel. Gebruik wanneer UseWebDeploy == true && WebAppKind != linux && WebAppKind != applinux && WebAppKind != "". Standaardwaarde: false.

Gebruik deze optie om msdeploy-vlag MSDEPLOY_RENAME_LOCKED_FILES=1 in te schakelen in Azure App Service toepassingsinstellingen. Met de optie kan msdeploy de naam wijzigen van vergrendelde bestanden die zijn vergrendeld tijdens de implementatie van de app.


enableXmlTransform - XML-transformatie
Invoeralias: XmlTransformation. boolean. Optioneel. Gebruik wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Standaardwaarde: false.

De configuratietransformaties worden uitgevoerd voor *.Release.config en *.<EnvironmentName>.config op de *.config file.

Configuratietransformaties worden uitgevoerd voordat de variabele wordt vervangen.

XML-transformaties worden alleen ondersteund voor het Windows-platform.


enableXmlVariableSubstitution - XML-variabele vervangen
Invoeralias: XmlVariableSubstitution. boolean. Optioneel. Gebruik wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war. Standaardwaarde: false.

Variabelen die zijn gedefinieerd in de build- of release-pijplijn, worden vergeleken met de key vermeldingen of name in de appSettingssecties , applicationSettingsen connectionStrings van elk configuratiebestand en parameters.xml. Variabele vervanging wordt uitgevoerd na configuratietransformaties.

Opmerking: als dezelfde variabelen zijn gedefinieerd in de releasepijplijn en in de omgeving, vervangen de omgevingsvariabelen de releasepijplijnvariabelen.


JSONFiles - JSON-variabele vervangen
string. Optioneel. Gebruik wanneer WebAppKind != linux && WebAppKind != applinux && WebAppKind != "" && Package NotEndsWith .war.

Biedt een nieuwe door regels gescheiden lijst met JSON-bestanden om de variabelewaarden te vervangen. Bestandsnamen moeten worden opgegeven ten opzichte van de hoofdmap.

Als u JSON-variabelen wilt vervangen die genest of hiërarchisch zijn, geeft u deze op met behulp van JSONPath expressies.

Als u bijvoorbeeld de waarde van ConnectionString in het onderstaande voorbeeld wilt vervangen, moet u een variabele definiëren zoals Data.DefaultConnection.ConnectionString in de build-/release-pijplijn (of de omgeving van de release-pijplijn).

{
  "Data": {
    "DefaultConnection": {
      "ConnectionString": "Server=(localdb)\SQLEXPRESS;Database=MyDB;Trusted_Connection=True"
    }
  }
}

Variabele vervanging wordt uitgevoerd na configuratietransformaties.

Opmerking: pijplijnvariabelen worden uitgesloten in vervanging.


Opties voor taakbeheer

Alle taken hebben besturingsopties naast hun taakinvoer. Zie Besturingsopties en algemene taakeigenschappen voor meer informatie.

Uitvoervariabelen

Geen.

Opmerkingen

Er is een nieuwere versie van deze taak beschikbaar. Zie AzureRmWebAppDeployment@4 voor meer informatie.

Problemen oplossen

Ik kan niet web implementeren in mijn Azure App Service met behulp van Microsoft Entra ID-verificatie van mijn Windows-agent

De taak Azure App Service implementeren ondersteunt het maken van verbinding met Microsoft Azure met een ARM-serviceverbinding met behulp van Microsoft Entra ID, tenzij de volgende drie voorwaarden aanwezig zijn:

  • U gebruikt de Web Deploy-pakketindeling op een Windows-agent
  • Uw agent wordt uitgevoerd met een oudere versie van msdeploy.exe (bijvoorbeeld wanneer u de installatiekopie van de gehoste windows-2019-agent gebruikt)
  • Basisverificatie is uitgeschakeld voor uw Azure App Service

Als deze drie voorwaarden aanwezig zijn, ontvangt u een foutmelding zoals App Service is configured to not use basic authentication. This requires Web Deploy msdeploy.exe version 7.1.7225.2108 or higher. You need a version of Visual Studio that includes an updated version of msdeploy.exe. For more information, visit https://aka.ms/azdo-webapp-msdeploy.

Om dit probleem op te lossen, kunt u kiezen uit de volgende opties, in volgorde van voorkeur.

  1. Werk de agentinstallatiekopieën bij. Als u gehoste agents gebruikt, stapt u over van windows-2019 naar windows-2022 (of windows-latest). Als u zelf-hostende agents gebruikt, installeert u Visual Studio 2022 op de agent om een nieuwere versie van msdeploy.exeop te halen.
  2. Als u afhankelijk bent van een oudere agentinstallatiekopieën en de agent voor uw pijplijn niet kunt bijwerken, kunt u overwegen de taak op te splitsen, zodat de Azure App Service de implementatietaak wordt uitgevoerd in windows-2022 (of windows-latest).
  3. Als geen van deze opties mogelijk is, kunt u basisverificatie inschakelen voor uw Azure App Service.

Vereisten

Vereiste Beschrijving
Pijplijntypen YAML, klassieke build, klassieke release
Wordt uitgevoerd op Agent, DeploymentGroup
Eisen Geen
Functies Deze taak voldoet niet aan eventuele vereisten voor volgende taken in de taak.
Opdrachtbeperkingen Alle
Instelbare variabelen Alle
Agentversie 2.104.1 of hoger
Taakcategorie Implementeren