Skip to content

Instantly share code, notes, and snippets.

@johnkors
Last active February 24, 2020 12:36
Show Gist options
  • Save johnkors/759b3b2d89ba1fcab587d78be147ef35 to your computer and use it in GitHub Desktop.
Save johnkors/759b3b2d89ba1fcab587d78be147ef35 to your computer and use it in GitHub Desktop.
Azure Pipelines to create a deploy artifact and deploy to Azure App Service on Linux
stages:
- stage: CreateArtifacts
jobs:
- job: CreatesArtifacts
steps:
- script: dotnet publish -c Release ./src/MyProj/MyProj.csproj
- upload: ./src/MyProj/bin/Release/netcoreapp3.1/publish/
artifact: myprojartifact
- stage: Deploy
jobs:
- deployment: DeploysServices
pool:
vmImage: ubuntu-latest
environment: myenvironment
strategy:
runOnce:
deploy:
steps:
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy web app'
inputs:
appType: webAppLinux
ConnectedServiceName: 'MyServiceConnection'
WebAppName: some-azure-appservice # https://some-azure-appservice.azurewebsites.net
package: $(Pipeline.Workspace)/myprojartifact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment