Show:
Module: AutodocsCi

Methods

init ()

Initialisation step for Travis

Used to check/ set any Travis environment variables

shouldRun () Boolean

Based on the Travis environment variables, determines whether to trigger generation and publishing of documentation.

If FLAG_PUBLISH_ON_RELEASE is true, then will trigger if Travis says that a tag was pushed.

Otherwise, it will trigger when a branch is pushed, if Travis says that this is not a pull request, and the branch being pushed matches DOCUMENT_BRANCH.

Both cases also require that the correct build index for the current job matches DOCUMENT_JOB_INDEX. This is to ensure that documentation is only published once per successful build.

Returns:

Boolean:

true when documentation should be generated and published

Properties

REPO_SLUG

String (Environment Variable)

The repository to publish documentation to. Override if you wish to publish to a different repository.

Default: None - throws when not set

TRAVIS_BRANCH

String (Environment Variable)

The name of the current branch

Default: None - throws when not set

TRAVIS_BUILD_NUMBER

String (Environment Variable)

The build number, e.g. 74

Default: None - throws when not set

TRAVIS_JOB_NUMBER

String (Environment Variable)

The job number, e.g. 74.1

Default: None - throws when not set

TRAVIS_PULL_REQUEST

String (Environment Variable)

Whether this is a pull request.

Default: None - throws when not set

TRAVIS_REPO_SLUG

String (Environment Variable)

Used to set value of REPO_SLUG

Default: None - throws when not set

TRAVIS_TAG

String (Environment Variable)

Default: None