Ved at bruge denne side, du accepterer Privatlivspolitik.
Acceptere
EnterineEnterineEnterine
  • HJEM
  • Det pro
  • Teknik
  • Microsoft
    • Azurblå
    • Configmgr/SCCM
    • DPM
    • Orkester
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kontor 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Hold
  • Windows
    • Windows Admin Center
    • Windows klient
    • Windows Server
  • SCCM-forespørgselsindsamlingsliste
Læsning: Markering af Azure DevOps Builds som mislykket ved hjælp af kommandolinje
Font ResizerAa
EnterineEnterine
Font ResizerAa
  • HJEM
  • Det pro
  • Teknik
  • Microsoft
  • Windows
  • SCCM-forespørgselsindsamlingsliste
Søge
  • HJEM
  • Det pro
  • Teknik
  • Microsoft
    • Azurblå
    • Configmgr/SCCM
    • DPM
    • Orkester
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kontor 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Hold
  • Windows
    • Windows Admin Center
    • Windows klient
    • Windows Server
  • SCCM-forespørgselsindsamlingsliste
Azure DevOps

Markering af Azure DevOps Builds som mislykket ved hjælp af kommandolinje

Offentliggjort: februar 18, 2024
2 Min læst
DELE

Markering af Azure DevOps Builds som mislykket ved hjælp af kommandolinje.

In Azure DevOps, you can use the command-line interface (CLI) to manage and automate your build pipeline. Sometimes, 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 parameter, like this:

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

In this example, 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.

In conclusion, 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.

TAGGET:Azure DevOpsBashMicrosoft AzurePowerShell
Forrige artikel Configuration Manager Forespørgselsindsamlingsliste Configuration Manager SCCM Current Branch Build Numbers
Næste artikel Securing Your Linux Server: How to Check TLS/SSL Certificate Expiration Dates
1 Kommentar 1 Kommentar
  • M siger:
    april 8, 2025 på 2:57 er

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

    Svar

Efterlad et svar Annuller svar

Din e-mailadresse vil ikke blive offentliggjort. Påkrævede felter er markeret *

Denne side bruger Akismet til at reducere spam. Lær, hvordan dine kommentardata behandles.

Oversættelse

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

Populære indlæg

Systemkrav til Windows Server 2016
Windows Server
Configuration Manager Forespørgselsindsamlingsliste
Configuration Manager Forespørgselsindsamlingsliste
Configmgr
Struktureret/administreret navigation aktiveret på moderne sider i klassiske teamwebsteder
Teknik
SCCM Kunne ikke hente DP-placeringer som den forventede version fra MP
Configmgr

Seneste indlæg

Installation og konfiguration af Fail2ban til SSH-beskyttelse på Ubuntu 24.04
Linux
Aktivering og konfiguration af FirewallD på AlmaLinux
Linux
Brugeroprettelse og SSH-nøgleopsætning i AlmaLinux
Linux
Sådan nulstiller du adgangskoden på AlmaLinux
Linux

© 2023 Enterine

Gå til mobil version
Velkommen tilbage!

Log ind på din konto

Brugernavn eller e-mail-adresse
Adgangskode

Mistet din adgangskode?