Azure管道:脚本的输出在哪里?
我试图在自托管代理上构建我的Angular 13应用程序,并为此创建以下YAML片段:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '14.x'
- script: |
npm install -g @angular/cli
npm install
ng build --configuration production --aot
displayName: 'npm install and build'
workingDirectory: '$(Build.SourcesDirectory)/src'
我可以观察Agent _work-Directory的 /s目录,并且在我的任务运行后,没有Node_modules文件夹或Dister dist内部文件夹。
但也没有控制台输出。
如果我从行中删除“ npm install -g @angular/cli”行,则会创建一个node_modules文件夹,但没有dist -folder。
我很确定,Angular CLI的安装失败,但我的窗口中没有输出任何错误。 看起来像这样:
我如何获取更多日志来找出为什么角CLI无法正确安装?我看到在代理商上执行的“脚本”文件默认情况下在脚本前面放下@echo。
为什么?
我如何获得一些输出来找到我的问题?
I tried to build my Angular 13 app on a self-hosted agent and created the following YAML snippet for this:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '14.x'
- script: |
npm install -g @angular/cli
npm install
ng build --configuration production --aot
displayName: 'npm install and build'
workingDirectory: '$(Build.SourcesDirectory)/src'
I can observe the /s directory of the agent _work-directory and after my task was running, there is no node_modules folder or dist folder inside.
But also no console output.
If I remove the line "npm install -g @angular/cli" from the line, a node_modules folder gets created, but no dist-folder.
I am pretty sure that the installation of angular cli fails, but I do not get any error output in my window.
It just looks like this:
How can I get more logs to find out why the angular cli is not installing correctly? I saw that the "script" file that is executed on the agent puts an @echo off by default in front of the script.
Why is that?
How can I get some output to find my problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要从管道中获取更详细的日志,您可以添加变量
system.debug
,并将值设置为管道中的true
。对于YAML管道,您可以在YAML编辑页面右上角选择变量。
添加一个名称system.debug和dualue true的新变量。
有关日志的更多信息,请参阅审查日志以诊断管道问题。
To get more detailed log from the pipeline you can add the variable
system.debug
and set the value totrue
in your pipeline.For YAML pipelines, you can select Variables in the upper right corner of the YAML edit page.
Add a new variable with the name System.Debug and value true.
For more info about logs, please refer to Review logs to diagnose pipeline issues.