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.1.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.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: azdo_pipeline-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fac170b3068b5f2d6ba51b7d0e72fdad29efb8fe2ab63dd12167d04880f68dcb
MD5 6074e7cb25649a463fde8c76768b59d7
BLAKE2b-256 dd2eb19113e577043a3407198a26fdc581c873b2c4b1d518dd43b2938cbde810

See more details on using hashes here.

File details

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

File metadata

  • Download URL: azdo_pipeline-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0752be10c8fcfdc2622d28585975217e6d750079fa2a26f04be17c58c1891d2d
MD5 6c0325149ddb4f6f440a02c37604c689
BLAKE2b-256 16ceeb62b959f5698176076d816f08ab4f42797e07f2956f2beb2fc21ed4bc65

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