azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

Pipelines show log command

Open ishitam8 opened this issue 6 years ago • 12 comments

Command Description
az pipelines build show-log Show logs for a given build ID

ishitam8 avatar Jan 24 '19 06:01 ishitam8

Why show-log? Isn't log enough? az pipelines build log? or is it because of the verb guidance? Let me just check guidelines once again

geverghe avatar Jan 24 '19 07:01 geverghe

I stand corrected. The guidelines do indicate that a verb is required. Including relevant except:

All command names should contain a verb e.g. account get-connection-string instead of account connection-string

geverghe avatar Jan 24 '19 08:01 geverghe

Hi guys! Any ETA on that feature? Thanks.

melezhik avatar Apr 18 '19 17:04 melezhik

az pipelines build show-log is long , IMHO. Any alternatives?

melezhik avatar Apr 19 '19 03:04 melezhik

@melezhik - We are right now working on a few high priority items and I do not have a conclusive ETA on this. I will keep this thread posted on the progress. We arrived at the command structure using the guidelines provided by Azure CLI. However, we are open to suggestions as well - what would be your ideal command for this look like? Would it work if you could just alias this command to your ideal command structure?

geverghe avatar Apr 23 '19 10:04 geverghe

Having access to logs in that way is still very interesting. Is there any chance to see some progress on this issue? That would be very helpful.

titimoby avatar Nov 25 '20 09:11 titimoby

Hi, any update on this? Is there a workaround available?

ajpaon avatar Nov 02 '21 22:11 ajpaon

Any update here? This would be a really useful command. Thanks!

davep3rrett avatar Jun 02 '23 17:06 davep3rrett

this is really helpful and standard in other CI systems like Concourse CI ... using this in the mean while


buildNumber=<build number>
organization=<organization>

# Get Azure Subscription ID
subscriptionId=$(az account show --query id -o tsv)

# Get Azure Access Token to authorize HTTP requests
azureAccessToken=$(az account get-access-token --query accessToken -o tsv)

curl -sL \
    -H "authorization: bearer $azureAccessToken" \
    -H "content-type: application/json" \
    "https://$organization.visualstudio.com/$subscriptionId/_apis/build/builds/$buildNumber/logs" | jq '.value[].url'


404pilo avatar Jun 19 '23 17:06 404pilo