Skip to main content

Continuous Integration Information

Project description

ci-info

PyPI version Build Status

A Python implementation of watson/ci-info. Get details about the current Continuous Integration environment.

Please open an issue if your CI server isn't properly detected :)

Supported CI tools

Officially supported CI servers:

Name is PR
AWS CodeBuild 🚫
AppVeyor
Azure Pipelines
Bamboo by Atlassian 🚫
Bitbucket Pipelines
Bitrise
Buddy
Buildkite
CircleCI
Cirrus CI
Codeship 🚫
Drone
dsari 🚫
GitLab CI 🚫
GoCD 🚫
Hudson 🚫
Jenkins CI
Magnum CI 🚫
Netlify CI
Nevercode
Sail CI
Semaphore
Shippable
Solano CI
Strider CD 🚫
TaskCluster 🚫
TeamCity by JetBrains 🚫
Travis CI

Installation

pip install ci-info

Usage

import ci_info
if ci_info.is_ci():
    print(ci_info.name())

"My CI Name"

API

ci_info.name()

Returns a string containing name of the CI server the code is running on. If CI server is not detected, it returns None.

Don't depend on the value of this string not to change for a specific vendor.

ci_info.is_ci()

Returns a boolean. Will be True if the code is running on a CI server, otherwise False.

Some CI servers not listed here might still trigger the ci_info.is_ci() boolean to be set to True if they use certain vendor neutral environment variables. In those cases ci_info.name() will be None and no vendor specific boolean will be set to True.

ci_info.is_pr()

Returns a boolean if PR detection is supported for the current CI server. Will be True if a PR is being tested, otherwise False. If PR detection is not supported for the current CI server, the value will be None.

ci_info.info()

Returns a dictionary of all above values in key/value pairs.

License

MIT

Project details


Download files

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

Files for ci-info, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size ci_info-0.2.0-py3-none-any.whl (6.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ci-info-0.2.0.tar.gz (20.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page