Skip to main content

Call Azure DevOps pipeline and optionally search output.

Project description

Overview

A Python module to call Azure DevOps pipeline and optionally search output.

Prerequisites

  • Python 3.9 or higher.

  • Azure DevOps PAT (Personal Access Token) with Builds (read and execute) permissions.

Usage

Installation:

pip3 install azdo_pipeline
# or
python3 -m pip install azdo_pipeline

Bash:

call_azdo_pipeline \
   -t "<pat>" \
   -o "<org>" \
   -p "<project_id>" \
   -l <pipeline_id> \
   [-d '<run_parameters>' \]
   [-r <run_id> \]
   [-g <log_id> \]
   [-s "<search_pattern>"]

Example:

call_azdo_pipeline \
   -t "sd354sd36f5sf4s6v4s" \
   -o "my-org" \
   -p "asfj-349859njnkfv-dvdf-3rfsw" \
   -l 35 \
   -d '{"templateParameters": {"agentPool": "ubuntu-latest"}}' \
   -r 3210 \
   -g 6 \
   -s ".*SUCCESSFUL.*"

Retrieving pipeline run logs list...
Retrieving pipeline run log 9...
Extracting output from logs...
{ 'data': '2025-08-23T08:07:29.0226728Z SUCCESSFUL',
   'run_id': 3210,
   'status': 200}

Arguments

  • -t PAT (Personal Access Token) for Azure DevOps authentication.

  • -o Organization name in Azure DevOps.

  • -p Project ID or name in Azure DevOps.

  • -l Pipeline ID in Azure DevOps.

  • -d (Optional) JSON string with run parameters.

  • -r (Optional) Specific run ID to fetch logs from.

  • -g (Optional) Specific log ID to fetch.

  • -s (Optional) Regex pattern to search for in the logs.

Return Value

A dictionary with the following keys: - data: The matched log line or an empty string if no match is found. - run_id: The ID of the pipeline run. - status: The HTTP status code of the API response.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azdo_pipeline-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azdo_pipeline-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file azdo_pipeline-1.0.0.tar.gz.

File metadata

  • Download URL: azdo_pipeline-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.154+

File hashes

Hashes for azdo_pipeline-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c0d2a1d59813b62afdce42e9f46f512f5682e057689585b56cd33b75d6aeb52
MD5 1490d2740463cd8bc642002afabba4f3
BLAKE2b-256 79e1b7fe4856e9d51e81319bf1eb8b626480c9b6ddd5dc9033f4e9bc8e9f9932

See more details on using hashes here.

File details

Details for the file azdo_pipeline-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: azdo_pipeline-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.154+

File hashes

Hashes for azdo_pipeline-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59008eed0f76c7b7687ddd8eca133d0fde74aab7ce52966ba234e9f63eb47cda
MD5 aa295b4e11d5b1e1b8830a8585019d72
BLAKE2b-256 febf2e3b6721a1ef937bea3c8c8c614dca3747502c9b1f4aa870eb66f84cdf92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page