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.

Source Distribution

ci-info-0.2.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

ci_info-0.2.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file ci-info-0.2.0.tar.gz.

File metadata

  • Download URL: ci-info-0.2.0.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for ci-info-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dd70632c977feb8797b1e633507166b64ad5f57183cebb2b0ea56934abba4616
MD5 90d58d7c15b478a917c78ed9f31813b2
BLAKE2b-256 53b0c76c64104d0865a9ee428037a33d59f2d1fdaedd82fb7072500e28cccddd

See more details on using hashes here.

File details

Details for the file ci_info-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ci_info-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for ci_info-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c59143d3aef96efcf46e6ec924275b3967eb9f6e922b1fbcb59bacc6bb77fc5c
MD5 6884b3051eaf97b9f5dd3d17e7388d9d
BLAKE2b-256 cf01664a10490000d7154fa71358af87681696b8116a12d869a267063c470fbc

See more details on using hashes here.

Supported by

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