Get details about the current Continuous Integration environment.
Download as a binary and get info regardless of language
curl -L https://github.com//KlotzAndrew/ci-info/releases/latest/download/ci-info.linux-amd64 > ./ci-info
chmod +x ./ci-info
./ci-info help
You can find the latest release here: https://github.com/KlotzAndrew/ci-info/releases/latest
go get -u https://github.com/KlotzAndrew/ci-info
ci-info help
ci-info isci
# true
ci-info ispr
# flase
ci-info cancheckpr
# false
ci-info ciname
# Travis CI
package main
import (
"fmt"
"github.com/klotzandrew/ci-info/ci"
)
func main() {
fmt.Printf(
"ci: %v, can_check_pr: %v, pr %v, name: %v",
ci.IsCI(),
ci.CanCheckPR(),
ci.IsPR(),
ci.Name(),
)
info := ci.Info()
fmt.Printf(
"ci: %v, can_check_pr: %v, pr %v, name: %v",
info.IsCI,
info.CanCheckPR,
info.IsPR,
info.Name,
)
}
Data here: ci/vendors.go
Name | CanCheckPR |
---|---|
AWS CodeBuild | 🚫 |
AppVeyor | ✅ |
Azure Pipelines | ✅ |
Bamboo by Atlassian | 🚫 |
Bitbucket Pipelines | ✅ |
Bitrise | ✅ |
Buddy | ✅ |
Buildkite | ✅ |
CircleCI | ✅ |
Cirrus CI | ✅ |
Codeship | 🚫 |
Drone | ✅ |
dsari | 🚫 |
GitHub Actions | ✅ |
GitLab CI | 🚫 |
GoCD | 🚫 |
Heroku | 🚫 |
Hudson | 🚫 |
Jenkins CI | ✅ |
Magnum CI | 🚫 |
ZEIT Now | 🚫 |
Netlify CI | ✅ |
Nevercode | ✅ |
Render | ✅ |
Sail CI | ✅ |
Semaphore | ✅ |
Shippable | ✅ |
Solano CI | ✅ |
Strider CD | 🚫 |
TaskCluster | 🚫 |
TeamCity by JetBrains | 🚫 |
Travis CI | ✅ |