UNPKG

2.17 kBTypeScriptView Raw
1/**
2 * Returns a boolean. Will be `true` if the code is running on a CI server,
3 * otherwise `false`.
4 *
5 * Some CI servers not listed here might still trigger the `ci.isCI`
6 * boolean to be set to `true` if they use certain vendor neutral environment
7 * variables. In those cases `ci.name` will be `null` and no vendor specific
8 * boolean will be set to `true`.
9 */
10export const isCI: boolean;
11/**
12 * Returns a boolean if PR detection is supported for the current CI server.
13 * Will be `true` if a PR is being tested, otherwise `false`. If PR detection is
14 * not supported for the current CI server, the value will be `null`.
15 */
16export const isPR: boolean | null;
17/**
18 * Returns a string containing name of the CI server the code is running on. If
19 * CI server is not detected, it returns `null`.
20 *
21 * Don't depend on the value of this string not to change for a specific vendor.
22 * If you find your self writing `ci.name === 'Travis CI'`, you most likely want
23 * to use `ci.TRAVIS` instead.
24 */
25export const name: string | null;
26
27export const APPVEYOR: boolean;
28export const AZURE_PIPELINES: boolean;
29export const APPCIRCLE: boolean;
30export const BAMBOO: boolean;
31export const BITBUCKET: boolean;
32export const BITRISE: boolean;
33export const BUDDY: boolean;
34export const BUILDKITE: boolean;
35export const CIRCLE: boolean;
36export const CIRRUS: boolean;
37export const CODEBUILD: boolean;
38export const CODEFRESH: boolean;
39export const CODESHIP: boolean;
40export const DRONE: boolean;
41export const DSARI: boolean;
42export const GITHUB_ACTIONS: boolean;
43export const GITLAB: boolean;
44export const GOCD: boolean;
45export const HUDSON: boolean;
46export const JENKINS: boolean;
47export const LAYERCI: boolean;
48export const MAGNUM: boolean;
49export const NETLIFY: boolean;
50export const NEVERCODE: boolean;
51export const RENDER: boolean;
52export const SAIL: boolean;
53export const SEMAPHORE: boolean;
54export const SCREWDRIVER: boolean;
55export const SHIPPABLE: boolean;
56export const SOLANO: boolean;
57export const STRIDER: boolean;
58export const TASKCLUSTER: boolean;
59export const TEAMCITY: boolean;
60export const TRAVIS: boolean;
61export const VERCEL: boolean;
62export const APPCENTER: boolean;