Door deze site te gebruiken, u gaat akkoord met de Privacybeleid.
Accepteren
EnterinITEnterinITEnterinIT
  • THUIS
  • IT-PRO
  • TECH
  • MICROSOFT
    • Azuur
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kantoor 365
    • Kantoor insider
    • PowerBI
    • Skypen
    • SQL-server
    • Teams
  • VENSTERS
    • Windows-beheercentrum
    • Windows-client
    • Windows-server
  • SCCM-queryverzamelingslijst
Lezing: Bash start Azure DevOps Release via API
Lettergrootte wijzigenAa
EnterinITEnterinIT
Lettergrootte wijzigenAa
  • THUIS
  • IT-PRO
  • TECH
  • MICROSOFT
  • VENSTERS
  • SCCM-queryverzamelingslijst
Zoekopdracht
  • THUIS
  • IT-PRO
  • TECH
  • MICROSOFT
    • Azuur
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kantoor 365
    • Kantoor insider
    • PowerBI
    • Skypen
    • SQL-server
    • Teams
  • VENSTERS
    • Windows-beheercentrum
    • Windows-client
    • Windows-server
  • SCCM-queryverzamelingslijst
Bas

Bash start Azure DevOps Release via API

Published August 26, 2024
2 Min. gelezen
DEEL

Bash start Azure DevOps Release via API.

To start a release from Azure DevOps via the API using bash, you can use the following steps:

  1. Obtain a Personal Access Token (PAT) from Azure DevOps. This token will be used to authenticate your API requests.
  2. Determine the Azure DevOps organization name, project name, and release pipeline ID for the release you want to start. You can find the release pipeline ID by navigating to the Releases page in Azure DevOps, selecting the release pipeline, and copying the ID from the URL.
  3. Construct the API request URL with the appropriate parameters. The URL should have the following format:
https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=7.0

Replace {organization} with the name of your Azure DevOps organization, {project} with the name of your project you want to start.

  1. Create a bash script with the following code, replacing the placeholders with your own values:
#!/bin/bash

# Set variables
PAT="YOUR-PAT-HERE"
ORGANIZATION="YOUR-ORGANIZATION-NAME-HERE"
PROJECT="YOUR-PROJECT-NAME-HERE"
RELEASE_ID="YOUR-RELEASE-ID-HERE"

# Construct API request URL
URL="https://vsrm.dev.azure.com/${ORGANIZATION}/${PROJECT}/_apis/release/releases?api-version=7.0"

# Start release
curl -X POST \
  -H "Authorization: Basic $(echo -n ":${PAT}" | base64)" \
  -H "Content-Type: application/json" \
  -d "{"definitionId": "${RELEASE_ID}"}" \
  ${URL}
  1. Save the script and execute it in a terminal window. The script will start the release pipeline in Azure DevOps using the API.

Note that this script assumes you have the curl command-line tool installed on your system. If you don’t have curl, you can install it using your package manager.

Note that if you need to start releases in Release Pipeline automatically (without manual actions) make this change in Release Pipeline

GETAGD:Azure DevOpsBasCentOSLinuxMicrosoft AzureUbuntu
Vorig artikel Securing Your Linux Server: How to Check TLS/SSL Certificate Expiration Dates
Volgend artikel How to Update Sysmon on Windows – Step by Step Guide
Laat een reactie achter Laat een reactie achter

Laat een reactie achter Antwoord annuleren

Uw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd *

Deze site gebruikt Akismet om spam te verminderen. Ontdek hoe uw reactiegegevens worden verwerkt.

Vertaling

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
 Vertaling bewerken
door Transposh - Vertaalplugin voor Wordpress

Populaire berichten

Systeemvereisten voor Windows Server 2016
Windows-server
Configuration Manager Queryverzamelingslijst
Configuration Manager Queryverzamelingslijst
ConfiguratieMgr
Gestructureerde/beheerde navigatie ingeschakeld op moderne pagina's in klassieke teamsites
Technologie
SCCM Kan DP-locaties niet ophalen als de verwachte versie van MP
ConfiguratieMgr

Recente berichten

Fail2ban installeren en configureren voor SSH-bescherming op Ubuntu 24.04
Linux
FirewallD inschakelen en configureren op AlmaLinux
Linux
Gebruikers aanmaken en SSH-sleutel instellen in AlmaLinux
Linux
Hoe het wachtwoord op AlmaLinux opnieuw in te stellen
Linux

© 2023 EnterinIT

Ga naar mobiele versie
advertentiebanner
Welkom terug!

Log in op uw account

Gebruikersnaam of e-mailadres
Wachtwoord

Wachtwoord vergeten?