npm.io
0.1.0 • Published 3d ago

@nexus-report/ci

Licence
MIT
Version
0.1.0
Deps
1
Size
38 kB
Vulns
0
Weekly
0

@nexus-report/ci

CI environment detection for nexus-report. Automatically detects and extracts metadata from GitHub Actions, GitLab CI, Jenkins, Azure DevOps, and CircleCI — zero configuration required.

Install

npm install @nexus-report/ci

Usage

import { detectCI } from '@nexus-report/ci';

const ci = detectCI();
console.log(ci);
// { isCI: true, name: 'GitHub Actions', buildUrl: 'https://github.com/...', ... }

Supported Environments

Provider Detection Variable Info Extracted
GitHub Actions GITHUB_ACTIONS Run ID, repo, actor, branch, PR number, build URL
GitLab CI GITLAB_CI Pipeline ID, job ID, project, branch, commit
Jenkins JENKINS_URL Build URL, job name, build number, node
Azure DevOps TF_BUILD Build ID, definition name, repo, branch
CircleCI CIRCLECI Build number, workflow, project, branch

Keywords