Skip to content

Instantly share code, notes, and snippets.

@ErikAndreas
Created March 13, 2019 09:02
Show Gist options
  • Save ErikAndreas/cca77df8ddb1d084ac9a8f41371a42fa to your computer and use it in GitHub Desktop.
Save ErikAndreas/cca77df8ddb1d084ac9a8f41371a42fa to your computer and use it in GitHub Desktop.
.net core 2 azure functions function app Azure pipeline deploy to Azure function app, also see https://medium.com/microsoftazure/serverless-devops-and-ci-cd-part-2-b6e0a6d05530
pool:
vmImage: Hosted Ubuntu 1604
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '$(Parameters.RestoreBuildProjects)'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '$(Parameters.RestoreBuildProjects)'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '$(Parameters.TestProjects)'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: false
projects: '$(Parameters.RestoreBuildProjects)'
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: True
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()
steps:
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy Azure App Service'
inputs:
azureSubscription: '$(Parameters.ConnectedServiceName)'
appType: '$(Parameters.WebAppKind)'
WebAppName: '$(Parameters.WebAppName)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment