tic (version 0.2.13.9010)

ci: The current CI environment

Description

Returns an instance of the CI class that describes the CI environment. The value is retrieved only once and then cached.

Usage

ci()

CI

Arguments

Format

An object of class R6ClassGenerator of length 24.

Methods

get_branch()

The current branch name, empty if tag.

get_tag()

The current tag name, empty if branch.

is_tag()

Branch or tag?

get_slug()

The repo slug in the format user/repo or org/repo.

get_build_number()

The build number.

get_build_url()

The URL of the build.

get_commit()

The SHA1 of the current commit.

is_interactive()

Global setup operations shouldn't be run on an interactive CI, only on unattended CIs where this method returns FALSE.

cat_with_color(code)

Colored output targeted to the CI log. The code argument can be an unevaluated call to a crayon function, the style will be applied even if it normally wouldn't be.