0

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:

enter image description here

If I look at the directory via CLI - I see the files

enter image description here

The downloaded artifact appears correct: enter image description here

[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.

5
  • You can download the build artifacts if you look at a successful build afterwards. Check this artifact. If it is correct, you are probably uploading something else to Azure - unfortunately you did not show how you are uploading it. Commented Mar 28, 2020 at 7:40
  • I thought the PublishBuildArtifact is the part that uploads it - I put the entire yml file, sounds like I'm missing something? Commented Mar 28, 2020 at 11:54
  • Please try to deploy your app to Azure App Service manually so that we can check if it's your application itself caused the error instead of ADO. Also, please refer to this thread and you can see what the true problem is rather than ":( Application Error". Commented Mar 30, 2020 at 8:25
  • Could you please share the log op the application? You might have the same problem I had Though I am using React instead of Angular. Should work the same since it can both use the pm2 environment Commented May 5, 2020 at 15:01
  • Check out this: stackoverflow.com/a/63501266/6908282 Commented May 28, 2021 at 16:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.