Skip to main content
Dotset CLI API Documentation / index / CIProvider

Type Alias: CIProvider

type CIProvider = 
  | "github"
  | "gitlab"
  | "azure"
  | "jenkins"
  | "circleci"
  | "travis"
  | "bitbucket"
  | "teamcity"
  | "buildkite"
  | "codebuild"
  | "drone"
  | "semaphore"
  | "appveyor"
  | "harness"
  | "woodpecker"
  | "unknown"
  | "local";
Defined in: src/mantle/ci/index.ts:119 CI/CD Integration Module Native integration with GitHub Actions, GitLab CI, and other CI providers.

Example

import {
  detectCIEnvironment,
  ExitCodes,
  determineExitCode,
  writeGitHubSummary,
  createGitHubAnnotation,
  ArtifactManager,
} from '@dotsetlabs/cli';

// Detect CI environment
const env = detectCIEnvironment();
console.log(`Running on: ${env.provider}`);

// Determine exit code based on findings
const exitCode = determineExitCode(scanResult, { failOnSeverity: 'high' });

// GitHub Actions: Write job summary
if (env.provider === 'github') {
  await writeGitHubSummary(scanResult);

  // Create annotations for findings
  for (const finding of scanResult.findings) {
    createGitHubAnnotation(finding);
  }
}

// Manage artifacts
const artifacts = new ArtifactManager({ basePath: './artifacts' });
await artifacts.write('sarif', sarifContent, { filename: 'mantle-results.sarif' });

process.exit(exitCode);