CI systems¶
Each CI system represents a continuous integration/delivery platform, and is associated with:
a unique CI ID
a human-readable name
an icon (emoji / unicode character)
various metadata in its
info()method
CI usage¶
Each CI system is materialized by a CI object, from which you can access various metadata:
>>> from extra_platforms import GITHUB_CI
>>> GITHUB_CI
CI(id='github_ci', name='GitHub Actions runner')
>>> GITHUB_CI.id
'github_ci'
>>> GITHUB_CI.current
False
>>> GITHUB_CI.info()
{'id': 'github_ci', 'name': 'GitHub Actions runner', 'icon': '🐙', 'url': 'https://docs.github.com/en/actions', 'current': False}
To check if the current environment is running in a specific CI system, use the corresponding detection function:
>>> from extra_platforms import is_github_ci
>>> is_github_ci()
False
The current CI system can be obtained via the current_ci() function:
>>> from extra_platforms import current_ci
>>> current_ci()
CI(id='unknown_ci', name='Unknown CI')
Recognized CI¶
Icon |
Symbol |
Name |
Detection function |
|---|---|---|---|
═ |
Azure Pipelines |
||
⟲ |
Bamboo |
||
🪁 |
Buildkite |
||
⪾ |
Circle CI |
||
≋ |
Cirrus CI |
||
ᚙ |
CodeBuild |
||
🐙 |
GitHub Actions runner |
||
🦊 |
GitLab CI |
||
⥁ |
Heroku CI |
||
🏙️ |
TeamCity |
||
👷 |
Travis CI |
Hint
The UNKNOWN_CI trait represents an unrecognized
CI system. It is not included in the ALL_CI group,
and will be returned by current_ci() if the current
CI system is not recognized.
Groups of CI¶
There is only one group defined for CI systems: ALL_CI, which includes all recognized CI systems.
Icon |
Symbol |
Description |
||
|---|---|---|---|---|
♺ |
CI systems |
⬥ |
---
config:
sankey:
height: 800
showValues: false
width: 800
---
sankey-beta
ALL_CI,AZURE_PIPELINES,1
ALL_CI,BAMBOO,1
ALL_CI,BUILDKITE,1
ALL_CI,CIRCLE_CI,1
ALL_CI,CIRRUS_CI,1
ALL_CI,CODEBUILD,1
ALL_CI,GITHUB_CI,1
ALL_CI,GITLAB_CI,1
ALL_CI,HEROKU_CI,1
ALL_CI,TEAMCITY,1
ALL_CI,TRAVIS_CI,1
---
config:
mindmap:
padding: 5
---
mindmap
((♺ ALL_CI))
(═ AZURE_PIPELINES)
(⟲ BAMBOO)
(🪁 BUILDKITE)
(⪾ CIRCLE_CI)
(≋ CIRRUS_CI)
(ᚙ CODEBUILD)
(🐙 GITHUB_CI)
(🦊 GITLAB_CI)
(⥁ HEROKU_CI)
(🏙️ TEAMCITY)
(👷 TRAVIS_CI)
Predefined CI¶
CI definitions and metadata.
- extra_platforms.AZURE_PIPELINES = CI(id='azure_pipelines', name='Azure Pipelines')¶
Identify Azure Pipelines environment.
ID:
azure_pipelinesName: Azure Pipelines
Icon: ═
Reference: <https://azure.microsoft.com/en-us/products/devops/pipelines/>_
Detection function:
is_azure_pipelines()Pytest decorators:
skip_azure_pipelines/unless_azure_pipelinesGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.BAMBOO = CI(id='bamboo', name='Bamboo')¶
Identify Bamboo environment.
ID:
bambooName: Bamboo
Icon: ⟲
Reference: <https://www.atlassian.com/software/bamboo>_
Detection function:
is_bamboo()Pytest decorators:
skip_bamboo/unless_bambooGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.BUILDKITE = CI(id='buildkite', name='Buildkite')¶
Identify Buildkite environment.
ID:
buildkiteName: Buildkite
Icon: 🪁
Reference: <https://buildkite.com>_
Detection function:
is_buildkite()Pytest decorators:
skip_buildkite/unless_buildkiteGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.CIRCLE_CI = CI(id='circle_ci', name='Circle CI')¶
Identify Circle CI environment.
ID:
circle_ciName: Circle CI
Icon: ⪾
Reference: <https://circleci.com>_
Detection function:
is_circle_ci()Pytest decorators:
skip_circle_ci/unless_circle_ciGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.CIRRUS_CI = CI(id='cirrus_ci', name='Cirrus CI')¶
Identify Cirrus CI environment.
ID:
cirrus_ciName: Cirrus CI
Icon: ≋
Reference: <https://cirrus-ci.org>_
Detection function:
is_cirrus_ci()Pytest decorators:
skip_cirrus_ci/unless_cirrus_ciGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.CODEBUILD = CI(id='codebuild', name='CodeBuild')¶
Identify CodeBuild environment.
ID:
codebuildName: CodeBuild
Icon: ᚙ
Reference: <https://aws.amazon.com/codebuild/>_
Detection function:
is_codebuild()Pytest decorators:
skip_codebuild/unless_codebuildGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.GITHUB_CI = CI(id='github_ci', name='GitHub Actions runner')¶
Identify GitHub Actions runner environment.
ID:
github_ciName: GitHub Actions runner
Icon: 🐙
Reference: <https://docs.github.com/en/actions>_
Detection function:
is_github_ci()Pytest decorators:
skip_github_ci/unless_github_ciGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.GITLAB_CI = CI(id='gitlab_ci', name='GitLab CI')¶
Identify GitLab CI environment.
ID:
gitlab_ciName: GitLab CI
Icon: 🦊
Reference: <https://docs.gitlab.com/topics/build_your_application/>_
Detection function:
is_gitlab_ci()Pytest decorators:
skip_gitlab_ci/unless_gitlab_ciGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.HEROKU_CI = CI(id='heroku_ci', name='Heroku CI')¶
Identify Heroku CI environment.
ID:
heroku_ciName: Heroku CI
Icon: ⥁
Reference: <https://www.heroku.com/continuous-integration/>_
Detection function:
is_heroku_ci()Pytest decorators:
skip_heroku_ci/unless_heroku_ciGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.TEAMCITY = CI(id='teamcity', name='TeamCity')¶
Identify TeamCity environment.
ID:
teamcityName: TeamCity
Icon: 🏙️
Reference: <https://www.jetbrains.com/teamcity/>_
Detection function:
is_teamcity()Pytest decorators:
skip_teamcity/unless_teamcityGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.TRAVIS_CI = CI(id='travis_ci', name='Travis CI')¶
Identify Travis CI environment.
ID:
travis_ciName: Travis CI
Icon: 👷
Reference: <https://www.travis-ci.com>_
Detection function:
is_travis_ci()Pytest decorators:
skip_travis_ci/unless_travis_ciGroups (2):
ALL_CI⬥,ALL_TRAITS
- extra_platforms.UNKNOWN_CI = CI(id='unknown_ci', name='Unknown CI')¶
Identify Unknown CI environment.
ID:
unknown_ciName: Unknown CI
Icon: ❓
Reference: <https://en.wikipedia.org/wiki/Continuous_integration>_
Detection function:
is_unknown_ci()Pytest decorators:
skip_unknown_ci/unless_unknown_ciGroups (2):
ALL_TRAITS,UNKNOWN⬥