tdpw
Version:
CLI tool for uploading Playwright test reports to TestDino platform with TestDino storage support
89 lines • 2.71 kB
TypeScript
/**
* Official documentation for CI/CD environment variables:
* - GitHub Actions: https://docs.github.com/en/actions/reference/workflows-and-actions/variables
* - CircleCI: https://circleci.com/docs/reference/variables/
* - GitLab CI: https://docs.gitlab.com/ci/variables/predefined_variables/
* - Jenkins: https://devopsqa.wordpress.com/2019/11/19/list-of-available-jenkins-environment-variables/
* - Azure DevOps: https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#pipeline-variables
*/
/**
* CI metadata structure matching server schema
*/
export interface CiMetadata {
provider: string;
pipeline: {
id: string;
name: string;
url: string;
};
build: {
number: string;
trigger: string;
};
environment: {
name: string;
type: string;
os: string;
node: string;
};
}
/**
* Collector for CI/CD metadata from environment variables
*/
export declare class CiCollector {
private static readonly env;
/**
* Collects comprehensive CI metadata from the current environment
* @returns Structured CI metadata including provider, pipeline, build, and environment info
*/
static collect(): CiMetadata;
/**
* Extracts system information common to all CI providers
*/
private static getSystemInfo;
/**
* Routes to the appropriate metadata extractor based on CI provider
*/
private static getProviderMetadata;
/**
* Extracts GitHub Actions specific metadata
*/
private static getGitHubActionsMetadata;
/**
* Extracts GitLab CI specific metadata
*/
private static getGitLabCIMetadata;
/**
* Determines GitLab pipeline name using fallback strategy
*/
private static getGitLabPipelineName;
/**
* Extracts CircleCI specific metadata
*/
private static getCircleCIMetadata;
/**
* Determines CircleCI build trigger based on environment variables
*/
private static getCircleCIBuildTrigger;
/**
* Extracts Jenkins specific metadata
*/
private static getJenkinsMetadata;
/**
* Extracts Azure DevOps specific metadata
*/
private static getAzureDevOpsMetadata;
/**
* Constructs Azure DevOps pipeline URL from environment variables
*/
private static buildAzureDevOpsPipelineUrl;
/**
* Determines Azure DevOps environment name with fallback strategy
*/
private static getAzureDevOpsEnvironmentName;
/**
* Fallback metadata extraction for unknown or generic CI providers
*/
private static getGenericMetadata;
}
//# sourceMappingURL=ci.d.ts.map