英文:
Getting Azure devops task curl output
问题
我有一个Azure DevOps管道,其中有一个任务用于curl一个URL,如下所示:
- script: 'curl -k https://localhost:5005/memorylogger'
condition: always()
displayName: '获取日志'
这似乎有效,但没有提供curl命令的输出(应该是HTML)。而是只显示这个:
输出来自curl,因为它提到了速度和百分比...
但如果我在Ubuntu机器上执行相同的curl命令,它会将HTML作为输出给我。
如何让Azure DevOps任务执行这个操作?我扫描了所有curl选项,但找不到更改这个的选项。
英文:
I have a Azure devops pipeline with a task in it to curl an url, like so:
- script: 'curl -k https://localhost:5005/memorylogger'
condition: always()
displayName: 'Get logging'
This works (I guess) but does not give me the output of the curl command (should be html)
Instead it shows only this:
The output is from curl because it mentions speeds and percentages..
But if I execute the same curl command on a ubuntu machine, It gives me the html as output.
How do I get the Azure devops task to do that? I scanned all tne curl options but cannot find a option that changes this.
答案1
得分: 1
我得到了相同的结果,当我没有可访问的URL时。
对于正确的URL,我得到了以下结果:
生成脚本。
脚本内容:
curl -k https://www.google.pl
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/7274b6ab-c2bd-4cec-ba9d-361fe8bfc443.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0<!doctype html>
评论