I am setting up a CI/CD pipeline in Azure DevOps to deploy the NodeJS app on a Linux hosted app service. The problem is that I have to run all the apt-get script manually, that was created after the deployment.
YAML code for the deployment:
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
condition: succeeded()
jobs:
- deployment: Deploy
displayName: Deploy
environment: $(environmentName)
pool:
vmImage: $(vmImageName)
workspace:
clean: all
strategy:
runOnce:
deploy:
steps:
- task: AzureWebApp@1
displayName: 'Azure Web App Deploy:'
inputs:
azureSubscription: $(azureSubscription)
appType: webAppLinux
appName: $(webAppName)
runtimeStack: 'NODE|16-lts'
package: $(Pipeline.Workspace)/drop/drop$(Build.BuildNumber).zip
startUpCommand: 'pm2 start index.js --no-daemon'
on:
success:
steps:
- script: sudo apt-get update
displayName: apt update
- script: sudo apt-get -y [SOME LIBS]
displayName: try install dependencies
Any solution would be grateful.