ci_diff_helper.appveyor module¶
Set of utilities for dealing with AppVeyor CI.
This module provides a custom configuration type
AppVeyor
for the AppVeyor CI system.
This module uses a selection of environment variables to detect
the state of AppVeyor configuration. See
environment_vars
for more details.
AppVeyor
Configuration Type¶
When running in AppVeyor, you can automatically detect your current environment and get the configuration object:
>>> import ci_diff_helper
>>> config = ci_diff_helper.get_config()
>>> config
<AppVeyor (active=True)>
To use the AppVeyor
configuration type directly:
>>> config = ci_diff_helper.AppVeyor()
>>> config
<AppVeyor (active=True)>
>>> config.branch
'master'
>>> config.provider
<AppVeyorRepoProvider.github: 'github'>
-
class
ci_diff_helper.appveyor.
AppVeyor
[source]¶ Bases:
ci_diff_helper._config_base.Config
Represent AppVeyor state and cache return values.
-
__delattr__
¶ x.__delattr__(‘name’) <==> del x.name
-
__format__
()¶ default object formatter
-
__getattribute__
¶ x.__getattribute__(‘name’) <==> x.name
-
__hash__
¶
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__setattr__
¶ x.__setattr__(‘name’, value) <==> x.name = value
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶
-
active
¶ bool: Indicates if currently running in the target CI system.
-
branch
¶ bool: Indicates the current branch in the target CI system.
This may indicate the active branch or the base branch of a pull request.
-
is_merge
¶ bool: Indicates if the HEAD commit is a merge commit.
-
provider
¶ str: The code hosting provider for the current AppVeyor build.
-
tag
¶ str: The
git
tag of the current AppVeyor build.Note
We only expect the
APPVEYOR_REPO_TAG_NAME
environment variable to be set whenAPPVEYOR_REPO_TAG=true
indicates the build was started by a pushed tag. However, we don’t verify that we are in a build started by a tag before checking for the tag.
-
-
class
ci_diff_helper.appveyor.
AppVeyorRepoProvider
[source]¶ Bases:
enum.Enum
Enum representing all possible AppVeyor repo providers.
-
bitbucket
= <AppVeyorRepoProvider.bitbucket: 'bitbucket'>¶
-
github
= <AppVeyorRepoProvider.github: 'github'>¶
-
gitlab
= <AppVeyorRepoProvider.gitlab: 'gitlab'>¶
-
kiln
= <AppVeyorRepoProvider.kiln: 'kiln'>¶
-
vso
= <AppVeyorRepoProvider.vso: 'vso'>¶
-