Skip to content
/ ci-info Public

gather continuous integration information on the fly

License

Notifications You must be signed in to change notification settings

mgxd/ci-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 isPR
Agola CI
Appcircle
AppVeyor
AWS CodeBuild
Azure Pipelines
Bamboo by Atlassian 🚫
Bitbucket Pipelines
Bitrise
Buddy
Buildkite
CircleCI
Cirrus CI
Cloudflare Pages 🚫
Cloudflare Workers 🚫
Codefresh
Codeship 🚫
Drone
dsari 🚫
Earthly CI 🚫
Expo Application Services 🚫
Gerrit CI 🚫
GitHub Actions
GitLab CI
Gitea Actions 🚫
GoCD 🚫
Google Cloud Build 🚫
Harness CI 🚫
Heroku 🚫
Hudson 🚫
Jenkins CI
LayerCI
Magnum CI 🚫
Netlify CI
Nevercode
Prow 🚫
ReleaseHub 🚫
Render
Sail CI
Screwdriver
Semaphore
Shippable
Solano CI
Sourcehut 🚫
Strider CD 🚫
TaskCluster 🚫
TeamCity by JetBrains 🚫
Travis CI
Vela
Vercel
Visual Studio App Center 🚫
Woodpecker

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

About

gather continuous integration information on the fly

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages