En utilisant ce site, vous acceptez le politique de confidentialité.
Accepter
EnterinITEnterinITEnterinIT
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
    • Azuré
    • ConfigMgr/SCCM
    • DPM
    • Orchestrateur
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Bureau 365
    • Bureau Insider
    • Power BI
    • Skype
    • Serveur SQL
    • Équipes
  • FENÊTRES
    • Centre d'administration Windows
    • Client Windows
    • Serveur Windows
  • Liste de collecte de requêtes SCCM
En lisant: Bash Start Azure DevOps Release via API
Redimensionneur de policeAa
EnterinITEnterinIT
Redimensionneur de policeAa
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
  • FENÊTRES
  • Liste de collecte de requêtes SCCM
Recherche
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
    • Azuré
    • ConfigMgr/SCCM
    • DPM
    • Orchestrateur
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Bureau 365
    • Bureau Insider
    • Power BI
    • Skype
    • Serveur SQL
    • Équipes
  • FENÊTRES
    • Centre d'administration Windows
    • Client Windows
    • Serveur Windows
  • Liste de collecte de requêtes SCCM
Frapper

Bash Start Azure DevOps Release via API

Publié en août 26, 2024
2 Lecture minimale
PARTAGER

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

Remplacer {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

ÉTIQUETÉ:Azure DevOpsFrapperCentOSLinuxMicrosoft AzureUbuntu
Article précédent Sécuriser votre serveur Linux: Comment vérifier les dates d'expiration du certificat TLS / SSL
Article suivant Comment mettre à jour Sysmon sur Windows – Guide étape par étape
Laisser un commentaire Laisser un commentaire

Laisser une réponse Annuler la réponse

Votre adresse email ne sera pas publiée. Les champs obligatoires sont marqués *

Ce site utilise Akismet pour réduire le spam. Découvrez comment les données de vos commentaires sont traitées.

Traduction

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

Articles populaires

Configuration système requise pour Windows Server 2016
Serveur Windows
Liste de collecte de requêtes Configuration Manager
Liste de collecte de requêtes Configuration Manager
Gestionnaire de configuration
Navigation structurée/gérée activée sur les pages modernes dans les sites d'équipe classiques
Technologie
SCCM n'a pas réussi à obtenir les emplacements DP comme version attendue de MP
Gestionnaire de configuration

Messages récents

Installation et configuration de Fail2ban pour la protection SSH sur Ubuntu 24.04
Linux
Activation et configuration de FirewallD sur AlmaLinux
Linux
Création d'utilisateur et configuration de la clé SSH dans AlmaLinux
Linux
Comment réinitialiser le mot de passe sur AlmaLinux
Linux

© 2023 EnterinIT

Aller à la version mobile
bannière publicitaire
Content de te revoir!

Connectez-vous à votre compte

Nom d'utilisateur ou adresse e-mail
Mot de passe

Vous avez perdu votre mot de passe?