MCPcopy Create free account
hub / github.com/algolia/cli / IsCI

Function IsCI

pkg/utils/utils.go:80–90  ·  view source on GitHub ↗

based on https://github.com/watson/ci-info/blob/HEAD/index.js

()

Source from the content-addressed store, hash-verified

78
79// based on https://github.com/watson/ci-info/blob/HEAD/index.js
80func IsCI() bool {
81 return os.Getenv(
82 "CI",
83 ) != "" || // GitHub Actions, Travis CI, CircleCI, Cirrus CI, GitLab CI, AppVeyor, CodeShip, dsari
84 os.Getenv("CONTINUOUS_INTEGRATION") != "" || // Travis CI, Cirrus CI
85 os.Getenv("BUILD_NUMBER") != "" || // Jenkins, TeamCity
86 os.Getenv("CI_APP_ID") != "" || // Appflow
87 os.Getenv("CI_BUILD_ID") != "" || // Appflow
88 os.Getenv("CI_BUILD_NUMBER") != "" || // Appflow
89 os.Getenv("RUN_ID") != "" // TaskCluster, dsari
90}
91
92// Convert slice of string to a readable string
93// eg: ["one", "two", "three"] -> "one, two and three"

Callers 2

IdentifyMethod · 0.92
shouldCheckForUpdateFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected