CI/CD release Angular:SSR Azure Devops
Наткнулся на очень распространенную ошибку. При накатывании релиза моего Angular app получаю ошибку
##[error]Error: No package found with specified pattern: D:\a\r1\a\**\*.zip<br/>Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.
Поиски показали что данная ошибка фиксается скриптом Yaml файл вот такой строкой
- task: PublishBuildArtifacts@1
Пробовал всеми вариациями, не помогло. Моя последняя версия yaml файла
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: |
npm install -g @angular/cli
npm install
npm outdated
npm run build:ssr --prod
displayName: 'npm install and build'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Как бы я не пытался я получаю все равно одну и туже ошибку, никак артифактов не собираю, просто хочу накатить на свой сервис web angular ssr
Ответы (1 шт):
Проблема решилась вот таким Yaml скриптом
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: |
npm install -g @angular/cli
npm install
npm outdated
npm run build:ssr --prod
displayName: 'npm install and build'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'dist'
ArtifactName: 'dist'