Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
623 stars 241 forks source link

Pipelines show log command #377

Open ishitam8 opened 5 years ago

ishitam8 commented 5 years ago
Command Description
az pipelines build show-log Show logs for a given build ID
geverghe commented 5 years ago

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 commented 5 years ago

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

melezhik commented 5 years ago

Hi guys! Any ETA on that feature? Thanks.

melezhik commented 5 years ago

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

geverghe commented 5 years ago

@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?

titimoby commented 3 years ago

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.

ajpaon commented 2 years ago

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

davep3rrett commented 1 year ago

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

yasselpiloto commented 1 year ago

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'