KlotzAndrew / ci-info

Get details about the current Continuous Integration environment - Go port of https://github.com/watson/ci-info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status codecov Coverage Status Maintainability Test Coverage Codacy Badge

GitHub go.mod Go version GitHub release (latest SemVer)

ci-info

Get details about the current Continuous Integration environment.

Download as a binary and get info regardless of language

Contributing

contributions welcome

Installation

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

Installation from source

go get -u https://github.com/KlotzAndrew/ci-info

ci-info help

Usage in CLI

ci-info isci
# true

ci-info ispr
# flase

ci-info cancheckpr
# false

ci-info ciname
# Travis CI

Usage in a GO project

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,
  )
}

Updating Supported CI tools

Data here: ci/vendors.go

Supported CI tools

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 βœ…

About

Get details about the current Continuous Integration environment - Go port of https://github.com/watson/ci-info


Languages

Language:Go 96.5%Language:Shell 2.2%Language:Makefile 1.3%