I'm battling with getting an angular app to build and then publish to an Azure resource. The Pipeline runs "successfully" but I am getting the ":( Application Error" when accessing the site. If I view wwwroot via Azure Portal -> Advanced Tools I ~~see the entire repo~~ see nothing:
If I look at the directory via CLI - I see the files
The downloaded artifact appears correct:
[EDIT - updated .yml file] Right now, my pipeline yml file is
variables:
System.Debug: true
trigger:
- develop
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install -g @angular/cli
npm install
ng build
displayName: 'npm install and build'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/dist/question-ui'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: app
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'app'
downloadPath: '$(System.ArtifactsDirectory)'
- task: AzureRmWebAppDeployment@4
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'qt-question-ui - Azure'
appType: 'webAppLinux'
WebAppName: 'qt-question-ui'
deployToSlotOrASE: true
ResourceGroupName: 'DEV_QTv2'
SlotName: 'production'
packageForLinux: '$(System.ArtifactsDirectory)/app/$(Build.BuildId).zip'
RuntimeStack: 'NODE|10-lts'
I've updated this as I progress, thinking I'm getting closer.