Ao usar este site, você concorda com o política de Privacidade.
Aceitar
Entrar em TIEntrar em TIEntrar em TI
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • Configmgr/sccm
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • Msi
    • Escritório 365
    • Insider Office
    • Power bi
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Leitura: Marking Azure DevOps Builds as Failed Using Command Line
Redimensionador de fontesAh
Entrar em TIEntrar em TI
Redimensionador de fontesAh
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
  • WINDOWS
  • Lista de coleta de consultas SCCM
Procurar
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • Configmgr/sccm
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • Msi
    • Escritório 365
    • Insider Office
    • Power bi
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Azure DevOps

Marking Azure DevOps Builds as Failed Using Command Line

Publicado: Fevereiro 18, 2024
2 Leitura mínima
COMPARTILHAR

Marking Azure DevOps Builds as Failed Using Command Line.

In Azure DevOps, you can use the command-line interface (CLI) to manage and automate your build pipeline. Às vezes, you may want to mark a build as failed using the CLI.

To mark a build as failed using the Azure DevOps CLI, you can use the following command:

az pipelines runs update --id <run-id> --state Failed

In this command, <run-id> is the ID of the build run that you want to mark as failed. You can find the run ID by navigating to the build summary page in the Azure DevOps portal.

Once you’ve run the command, the build will be marked as failed and any subsequent tasks in the build pipeline will be skipped.

You can also add a reason for the failure by including the --reason parâmetro, like this:

az pipelines runs update --id <run-id> --state Failed --reason "Build failed due to errors in script"

Neste exemplo, the reason for the failure is “Build failed due to errors in script”. This message will be displayed in the build summary page in the Azure DevOps portal.

Para concluir, using the Azure DevOps CLI, you can mark a build as failed with just a few simple commands. This can be useful in cases where you need to manually trigger a build failure or if there are errors in the build pipeline that you want to highlight.

MARCADO:Azure DevOpsBashMicrosoft AzurePowershell
Artigo Anterior Lista de coleta de consultas do Configuration Manager Configuration Manager SCCM Current Branch Build Numbers
Próximo artigo Securing Your Linux Server: How to Check TLS/SSL Certificate Expiration Dates
1 Comentário 1 Comentário
  • M diz:
    abril 8, 2025 at 2:57 sou

    This does not work. There is no command `update` for az pipeline runs.

    Responder

Deixe uma resposta Cancelar resposta

Seu endereço de e-mail não será publicado. Os campos obrigatórios estão marcados *

Este site usa Akismet para reduzir spam. Saiba como os dados dos seus comentários são processados.

Tradução

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
por Transposh - translation plugin for wordpress

Postagens populares

Requisitos do sistema para Windows Server 2016
Servidor Windows
Lista de coleta de consultas do Configuration Manager
Lista de coleta de consultas do Configuration Manager
Configmgr
Navegação estruturada/gerenciada habilitada em páginas modernas em sites de equipe clássicos
Tecnologia
SCCM Falha ao obter locais de DP como a versão esperada do MP
Configmgr

Postagens recentes

Instalando e configurando Fail2ban para proteção SSH no Ubuntu 24.04
Linux
Habilitando e configurando FirewallD no AlmaLinux
Linux
Criação de usuário e configuração de chave SSH no AlmaLinux
Linux
Como redefinir a senha no AlmaLinux
Linux

© 2023 Entrar em TI

Vá para a versão móvel
Bem vindo de volta!

Faça login na sua conta

Nome de usuário ou endereço de e-mail
Senha

Perdeu sua senha?