evergreen.js
Version:
JavaScript/TypeScript library for the Evergreen REST API
558 lines (557 loc) • 13.5 kB
TypeScript
export declare function ConvertToAdminSettings(raw: object): AdminSettings;
export declare function ConvertToAPITasks(raw: object): APITask;
export declare function ConvertToAPITests(raw: object): APITest;
export declare function ConvertToBuild(raw: object): Build;
export declare function ConvertToPatches(raw: object): Patches;
export declare class AdminSettings {
alerts?: AlertsConfig;
amboy?: AmboyConfig;
api?: APIConfig;
api_url?: string;
auth?: AuthConfig;
banner?: string;
banner_theme?: string;
bugsnag?: string;
client_binaries_dir?: string;
configdir?: string;
container_pools?: ContainerPools;
credentials?: object;
jasper?: JasperConfig;
expansions?: object;
google_analytics?: string;
github_pr_creator_org?: string;
hostinit?: HostInitConfig;
jira?: JiraConfig;
jira_notifications?: JiraNotificationsConfig;
keys?: object;
logger_config?: LoggerConfig;
log_path?: string;
notify?: NotifyConfig;
plugins?: object;
pprof_port?: string;
providers?: CloudProviders;
repotracker?: RepoTrackerConfig;
scheduler?: SchedulerConfig;
service_flags?: ServiceFlags;
slack?: SlackConfig;
splunk?: SplunkConnectionInfo;
superusers: string[];
triggers: TriggerConfig;
ui: UIConfig;
}
export declare class SMTPConfig {
server?: string;
port: number;
use_ssl: boolean;
username?: string;
password?: string;
from?: string;
admin_email?: string[];
}
export declare class AlertsConfig {
smtp?: SMTPConfig;
}
export declare class AmboyConfig {
name?: string;
single_name?: string;
database?: string;
pool_size_local: number;
pool_size_remote: number;
local_storage_size: number;
}
export declare class APIConfig {
http_listen_addr?: string;
github_webhook_secret?: string;
}
export declare class AuthConfig {
ldap?: LDAPConfig;
naive?: NaiveAuthConfig;
github?: GithubAuthConfig;
}
export declare class LDAPConfig {
url?: string;
port?: string;
path?: string;
service_path?: string;
group?: string;
service_group?: string;
expire_after_minutes?: string;
}
export declare class NaiveAuthConfig {
users?: AuthUser[];
}
export declare class AuthUser {
username?: string;
display_name?: string;
password?: string;
email?: string;
}
export declare class GithubAuthConfig {
client_id?: string;
client_secret?: string;
users?: string[];
organization?: string;
}
export declare class HostInitConfig {
ssh_timeout_secs: number;
}
export declare class JiraConfig {
host?: string;
username?: string;
password?: string;
default_project?: string;
}
export declare class LoggerConfig {
buffer?: LogBuffering;
default_level?: string;
threshold_level?: string;
logkeeper_url?: string;
}
export declare class LogBuffering {
duration_seconds: number;
count: number;
}
export declare class NotifyConfig {
buffer_target_per_interval: number;
buffer_interval_seconds: number;
smtp?: SMTPConfig;
}
export declare class CloudProviders {
aws?: AWSConfig;
docker?: DockerConfig;
gce?: GCEConfig;
openstack?: OpenStackConfig;
vsphere?: VSphereConfig;
}
export declare class ContainerPools {
pools?: ContainerPool[];
}
export declare class ContainerPool {
distro?: string;
id?: string;
max_containers: number;
port: number;
}
export declare class AWSConfig {
aws_secret?: string;
aws_id?: string;
s3_key?: string;
s3_secret?: string;
bucket?: string;
s3_base_url?: string;
}
export declare class DockerConfig {
api_version?: string;
}
export declare class GCEConfig {
client_email?: string;
private_key?: string;
private_key_id?: string;
token_uri?: string;
}
export declare class OpenStackConfig {
identity_endpoint?: string;
username?: string;
password?: string;
domain_name?: string;
project_name?: string;
project_id?: string;
region?: string;
}
export declare class Patches {
BuildsMap?: Record<string, BuildInfo[]>;
UIPatches?: PatchInfo[];
PageNum?: number;
}
export declare class UIVersion {
Version?: Version;
Builds?: UIBuild[];
PatchInfo?: UIPatch;
active_tasks?: number;
repo_owner?: string;
repo_name?: string;
upstream?: UIUpstreamData;
}
export declare class UIBuild {
Build?: Build;
Version?: Version;
PatchInfo?: UIPatch;
Tasks?: UITask[];
Elapsed?: number;
CurrentTime?: number;
repo_owner?: string;
repo_name?: string;
taskStatusCount?: TaskStatusCount;
UpstreamData?: UIUpstreamData;
}
export declare class TaskStatusCount {
succeeded?: number;
failed?: number;
started?: number;
undispatched?: number;
inactive?: number;
dispatched?: number;
timed_out?: number;
}
export declare class UITask {
Task?: Task;
Gitspec?: string;
BuildDisplay?: string;
TaskLog?: LogMessage[];
NextTasks?: Task[];
PreviousTasks?: Task[];
Elapsed?: number;
StartTime?: number;
failed_test_names?: string[];
expected_duration?: number;
}
export declare class Task {
}
export declare class LogMessage {
t?: string;
s?: string;
m?: string;
ts?: Time;
v?: number;
}
export declare class UIPatch {
Patch?: Patch;
StatusDiffs?: object;
base_time_taken?: number;
BaseVersionId?: string;
BaseBuildId?: string;
BaseTaskId?: string;
}
export declare class UIUpstreamData {
owner?: string;
repo: string;
revision?: string;
project_name?: string;
trigger_id?: string;
trigger_type?: string;
}
export declare class Version {
id?: string;
create_time?: Time;
start_time?: Time;
finish_time?: Time;
gitspec?: string;
author?: string;
author_email?: string;
message?: string;
status?: string;
order?: number;
config?: string;
ignored?: boolean;
owner_name?: string;
repo_name?: string;
branch_name?: string;
repo_kind?: string;
build_variants_status?: VersionBuildStatus[];
builds?: string[];
identifier?: string;
remote?: boolean;
remote_path?: string;
requester?: string;
errors?: string[];
warnings?: string[];
author_id?: string;
satisfied_triggers?: string[];
trigger_id?: string;
trigger_type?: string;
trigger_event?: string;
}
export declare class Build {
_id: string;
create_time: Date;
start_time: Date;
finish_time: Date;
version: string;
branch: string;
git_hash: string;
build_variant: string;
build_number: string;
status: string;
activated: boolean;
activated_by: string;
activated_time: Date;
order: number;
tasks: BuildTaskCache[];
time_taken: number;
display_name: string;
predicted_makespan: number;
actual_makespan: number;
r: string;
trigger_id: string;
trigger_type: string;
trigger_event: string;
}
export declare class BuildTaskCache {
id: string;
display_name: string;
status: string;
task_end_details: string;
start_time: Date;
time_taken: number;
activated: boolean;
}
export declare class VersionBuildStatus {
}
export declare class Patch {
Id?: string;
Description?: string;
Project?: string;
Githash?: string;
PatchNumber?: number;
Author?: string;
Version?: string;
Status?: string;
CreateTime?: Time;
StartTime?: Time;
FinishTime?: Time;
BuildVariants?: string[];
Tasks?: string[];
VariantTasks?: VariantTasks[];
Patches?: ModulePatch[];
Activated?: boolean;
PatchedConfig?: string;
Alias?: string;
GithubPatchData?: GithubPatch;
}
export declare class Time {
wall?: number;
ext?: number;
loc?: Location;
}
export declare class GithubPatch {
pr_number?: number;
base_owner?: string;
base_repo?: string;
base_branch?: string;
head_owner?: string;
head_repo?: string;
head_hash?: string;
author?: string;
author_uid?: number;
merge_commit_sha?: string;
}
export declare class ModulePatch {
name?: string;
githash?: string;
patch_set?: PatchSet;
}
export declare class PatchSet {
patch?: string;
patch_file_id?: string;
summary?: Summary[];
}
export declare class Summary {
filename?: string;
additions?: number;
deletions?: number;
}
export declare class VariantTasks {
Variant?: string;
Tasks?: string[];
DisplayTasks?: DisplayTask[];
}
export declare class DisplayTask {
Name?: string;
ExecTasks?: string[];
}
export declare class APITask {
task_id?: string;
project_id?: string;
create_time: Time;
dispatch_time: Time;
scheduled_time: Time;
start_time: Time;
finish_time: Time;
ingest_time: Time;
version_id?: string;
revision?: string;
priority: number;
activated: boolean;
activated_by?: string;
build_id?: string;
distro_id?: string;
build_variant?: string;
depends_on: string[];
display_name?: string;
host_id?: string;
restarts: number;
execution: number;
order: number;
status?: string;
status_details: APITaskEndDetail;
logs: APITaskLogLinks;
time_taken_ms: number;
expected_duration_ms: number;
est_wait_to_start_ms: number;
estimated_cost: number;
previous_executions: APITask[];
generate_task: boolean;
generated_by: string;
artifacts: APIFile[];
display_only: boolean;
execution_tasks?: string[];
mainline: boolean;
task_group: string;
task_group_max_hosts: number;
}
export declare class APIFile {
name?: string;
link?: string;
visibility?: string;
ignore_for_fetch: boolean;
}
export declare class APITaskEndDetail {
status?: string;
type?: string;
description?: string;
timed_out: boolean;
}
export declare class APITaskLogLinks {
all_log?: string;
task_log?: string;
agent_log?: string;
system_log?: string;
}
export declare class TestLogs {
url?: string;
line_num?: number;
url_raw?: string;
log_id?: string;
}
export declare class APITest {
task_id?: string;
status?: string;
test_file?: string;
logs?: TestLogs;
exit_code?: number;
start_time?: Time;
end_time?: Time;
}
export declare class VSphereConfig {
host?: string;
username?: string;
password?: string;
}
export declare class RepoTrackerConfig {
revs_to_fetch: number;
max_revs_to_search: number;
max_con_requests: number;
}
export declare class SchedulerConfig {
task_finder?: string;
host_allocator?: string;
free_host_fraction: number;
cache_duration_seconds: number;
}
export declare class ServiceFlags {
task_dispatch_disabled: boolean;
host_init_disabled: boolean;
monitor_disabled: boolean;
alerts_disabled: boolean;
agent_start_disabled: boolean;
repotracker_disabled: boolean;
scheduler_disabled: boolean;
github_pr_testing_disabled: boolean;
cli_updates_disabled: boolean;
background_stats_disabled: boolean;
task_logging_disabled: boolean;
cache_stats_job_disabled: boolean;
cache_stats_endpoint_disabled: boolean;
commit_queue_disabled: boolean;
planner_disabled: boolean;
host_allocator_disabled: boolean;
event_processing_disabled: boolean;
jira_notifications_disabled: boolean;
slack_notifications_disabled: boolean;
email_notifications_disabled: boolean;
webhook_notifications_disabled: boolean;
github_status_api_disabled: boolean;
}
export declare class SlackConfig {
options?: SlackOptions;
token?: string;
level?: string;
}
export declare class SlackOptions {
channel?: string;
hostname?: string;
name?: string;
username?: string;
icon_url?: string;
add_basic_metadata: boolean;
use_fields: boolean;
all_fields: boolean;
fields: object;
}
export declare class SplunkConnectionInfo {
url?: string;
token?: string;
channel?: string;
}
export declare class UIConfig {
url?: string;
help_url?: string;
http_listen_addr?: string;
secret?: string;
default_project?: string;
cache_templates: boolean;
csrf_key?: string;
cors_origin?: string;
}
export declare class JiraNotificationsConfig {
custom_fields: object;
}
export declare class TriggerConfig {
generate_distro?: string;
}
export declare class JasperConfig {
binary_name?: string;
download_file_name?: string;
port?: number;
url?: string;
version?: string;
}
export declare class PatchInfo {
id: string;
version: string;
author: string;
create_time: Date;
project: string;
description: string;
githash: string;
status: string;
base_version_id: string;
alias: string;
}
export declare class LogInfo {
command: string;
url: string;
}
export declare class TaskLogs {
agent: LogInfo[];
system: LogInfo[];
task: LogInfo[];
}
export declare class TaskEndDetail {
status?: string;
type?: string;
desc?: string;
timed_out?: boolean;
logs?: TaskLogs | null;
}
export declare class TaskInfo {
id: string;
display_name: string;
status: string;
status_details: TaskEndDetail;
}
export declare class BuildInfo {
id: string;
display_name: string;
tasks: TaskInfo[];
}