I was trying to create a node js deployment to an Azure web app resource. However, AzureWebApp@1
does not deploy the zip file to the correct location, it just tells me it was successful.
my yaml file looks like this:
trigger:
- master
stages:
- stage:
displayName: 'Dev Environment'
jobs:
- deployment: deploy_dev
displayName: Deploy to 'Dev
pool:
vmImage: 'ubuntu-latest'
environment: 'env-dev'
strategy:
runOnce:
deploy:
steps:
- checkout: self
- script: |
cd $(Build.SourcesDirectory)
pwd
ls
displayName: show directory
- script: npm install
displayName: 'Install dependencies'
- task: Npm@1
inputs:
command: 'custom'
customCommand: 'run build'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/build'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
- script: |
unzip -l $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
- task: AzureWebApp@1
inputs:
azureSubscription: <subscription>
appType: 'webAppLinux'
appName: <appname>
package: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
I added some extra logging just for my sanity. All the right files are found within the zip file. When I download the artifact, it too contains all the correct files:
but once I go and check in the kudolite bash and enter into the site/wwwroot
those files are nowhere to be found.
These appear to be just the default files for the default page Microsoft loads when a user creates a Linux node web app.
but yet AzureWebApp@1
claims to be successful. So something odd is happening, or I’m missing something obvious.