Created
July 4, 2023 05:42
-
-
Save abhilashca/46065f336f1791e4b0554f89bacbb7f1 to your computer and use it in GitHub Desktop.
Azure DevOps: CI/CD for Umbraco v11 deployment in Azure Web App Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger: | |
- develop | |
pool: | |
vmImage: ubuntu-latest | |
variables: | |
solution: 'path-to-solution' | |
project: 'path-to-project' | |
buildPlatform: 'Any CPU' | |
buildConfiguration: 'Release' | |
steps: | |
#1 Nuget tool install | |
- task: NuGetToolInstaller@1 | |
displayName: Install Nuget | |
#2 Nuget Restore | |
- task: NuGetCommand@2 | |
displayName: Restore Nuget packages | |
inputs: | |
restoreSolution: '$(solution)' | |
#3 Build the VS Project | |
- task: DotNetCoreCLI@2 | |
displayName: Build project | |
inputs: | |
command: 'build' | |
projects: '$(project)' | |
configuration: '$(buildConfiguration)' | |
arguments: '--configuration $(buildConfiguration) --runtime ubuntu.22.04-x64' | |
- task: DotNetCoreCLI@2 | |
displayName: 'Publish Artifact' | |
inputs: | |
command: 'publish' | |
publishWebProjects: true | |
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' | |
zipAfterPublish: true | |
- task: PublishBuildArtifacts@1 | |
displayName: 'Publish Artifact' | |
inputs: | |
PathtoPublish: '$(Build.ArtifactStagingDirectory)' | |
ArtifactName: 'drop' | |
- task: AzureWebApp@1 | |
displayName: 'Deploy to Azure Web App' | |
inputs: | |
appType: webAppLinux | |
azureSubscription: '$(AzureSubscription)' | |
appName: '$(AppName)' | |
deploymentMethod: zipDeploy | |
package: '$(Build.ArtifactStagingDirectory)/**/*.zip' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment