azure-pipelines-task-lib
Advanced tools
Comparing version 2.7.6 to 2.7.7
{ | ||
"name": "azure-pipelines-task-lib", | ||
"version": "2.7.6", | ||
"version": "2.7.7", | ||
"description": "VSTS Task SDK", | ||
@@ -5,0 +5,0 @@ "main": "./task.js", |
@@ -14,3 +14,3 @@ | ||
Step by Step: [Create Task](docs/stepbystep.md) | ||
Step by Step: [Create Task](https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=vsts) | ||
@@ -17,0 +17,0 @@ Documentation: [TypeScript API](docs/azure-pipelines-task-lib.md), [task JSON schema](https://aka.ms/vsts-tasks.schema.json) |
166
task.d.ts
@@ -9,3 +9,27 @@ import Q = require('q'); | ||
Failed = 2, | ||
Cancelled = 3, | ||
Skipped = 4, | ||
} | ||
export declare enum TaskState { | ||
Unknown = 0, | ||
Initialized = 1, | ||
InProgress = 2, | ||
Completed = 3, | ||
} | ||
export declare enum IssueType { | ||
Error = 0, | ||
Warning = 1, | ||
} | ||
export declare enum ArtifactType { | ||
Container = 0, | ||
FilePath = 1, | ||
VersionControl = 2, | ||
GitRef = 3, | ||
TfvcLabel = 4, | ||
} | ||
export declare enum FieldType { | ||
AuthParameter = 0, | ||
DataParameter = 1, | ||
Url = 2, | ||
} | ||
export declare const setStdStream: typeof im._setStdStream; | ||
@@ -19,3 +43,3 @@ export declare const setErrStream: typeof im._setErrStream; | ||
* | ||
* @param result TaskResult enum of Succeeded, SucceededWithIssues or Failed. | ||
* @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped. | ||
* @param message A message which will be logged as an error issue if the result is Failed. | ||
@@ -468,1 +492,141 @@ * @param done Optional. Instructs the agent the task is done. This is helpful when child processes | ||
} | ||
/** | ||
* Upload user interested file as additional log information | ||
* to the current timeline record. | ||
* | ||
* The file shall be available for download along with task logs. | ||
* | ||
* @param path Path to the file that should be uploaded. | ||
* @returns void | ||
*/ | ||
export declare function uploadFile(path: string): void; | ||
/** | ||
* Instruction for the agent to update the PATH environment variable. | ||
* The specified directory is prepended to the PATH. | ||
* The updated environment variable will be reflected in subsequent tasks. | ||
* | ||
* @param path Local directory path. | ||
* @returns void | ||
*/ | ||
export declare function prependPath(path: string): void; | ||
/** | ||
* Upload and attach summary markdown to current timeline record. | ||
* This summary shall be added to the build/release summary and | ||
* not available for download with logs. | ||
* | ||
* @param path Local directory path. | ||
* @returns void | ||
*/ | ||
export declare function uploadSummary(path: string): void; | ||
/** | ||
* Upload and attach attachment to current timeline record. | ||
* These files are not available for download with logs. | ||
* These can only be referred to by extensions using the type or name values. | ||
* | ||
* @param type Attachment type. | ||
* @param name Attachment name. | ||
* @param path Attachment path. | ||
* @returns void | ||
*/ | ||
export declare function addAttachment(type: string, name: string, path: string): void; | ||
/** | ||
* Set an endpoint field with given value. | ||
* Value updated will be retained in the endpoint for | ||
* the subsequent tasks that execute within the same job. | ||
* | ||
* @param id Endpoint id. | ||
* @param field FieldType enum of AuthParameter, DataParameter or Url. | ||
* @param key Key. | ||
* @param value Value for key or url. | ||
* @returns void | ||
*/ | ||
export declare function setEndpoint(id: string, field: FieldType, key: string, value: string): void; | ||
/** | ||
* Set progress and current operation for current task. | ||
* | ||
* @param percent Percentage of completion. | ||
* @param currentOperation Current pperation. | ||
* @returns void | ||
*/ | ||
export declare function setProgress(percent: number, currentOperation: string): void; | ||
/** | ||
* Indicates whether to write the logging command directly to the host or to the output pipeline. | ||
* | ||
* @param id Timeline record Guid. | ||
* @param parentId Parent timeline record Guid. | ||
* @param recordType Record type. | ||
* @param recordName Record name. | ||
* @param order Order of timeline record. | ||
* @param startTime Start time. | ||
* @param finishTime End time. | ||
* @param progress Percentage of completion. | ||
* @param state TaskState enum of Unknown, Initialized, InProgress or Completed. | ||
* @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped. | ||
* @param message current operation | ||
* @returns void | ||
*/ | ||
export declare function logDetail(id: string, message: string, parentId?: string, recordType?: string, recordName?: string, order?: number, startTime?: string, finishTime?: string, progress?: number, state?: TaskState, result?: TaskResult): void; | ||
/** | ||
* Log error or warning issue to timeline record of current task. | ||
* | ||
* @param type IssueType enum of Error or Warning. | ||
* @param sourcePath Source file location. | ||
* @param lineNumber Line number. | ||
* @param columnNumber Column number. | ||
* @param code Error or warning code. | ||
* @param message Error or warning message. | ||
* @returns void | ||
*/ | ||
export declare function logIssue(type: IssueType, message: string, sourcePath?: string, lineNumber?: number, columnNumber?: number, errorCode?: string): void; | ||
/** | ||
* Upload user interested file as additional log information | ||
* to the current timeline record. | ||
* | ||
* The file shall be available for download along with task logs. | ||
* | ||
* @param containerFolder Folder that the file will upload to, folder will be created if needed. | ||
* @param path Path to the file that should be uploaded. | ||
* @param name Artifact name. | ||
* @returns void | ||
*/ | ||
export declare function uploadArtifact(containerFolder: string, path: string, name?: string): void; | ||
/** | ||
* Create an artifact link, artifact location is required to be | ||
* a file container path, VC path or UNC share path. | ||
* | ||
* The file shall be available for download along with task logs. | ||
* | ||
* @param name Artifact name. | ||
* @param path Path to the file that should be associated. | ||
* @param artifactType ArtifactType enum of Container, FilePath, VersionControl, GitRef or TfvcLabel. | ||
* @returns void | ||
*/ | ||
export declare function associateArtifact(name: string, path: string, artifactType: ArtifactType): void; | ||
/** | ||
* Upload user interested log to build’s container “logs\tool” folder. | ||
* | ||
* @param path Path to the file that should be uploaded. | ||
* @returns void | ||
*/ | ||
export declare function uploadBuildLog(path: string): void; | ||
/** | ||
* Update build number for current build. | ||
* | ||
* @param value Value to be assigned as the build number. | ||
* @returns void | ||
*/ | ||
export declare function updateBuildNumber(value: string): void; | ||
/** | ||
* Add a tag for current build. | ||
* | ||
* @param value Tag value. | ||
* @returns void | ||
*/ | ||
export declare function addBuildTag(value: string): void; | ||
/** | ||
* Update release name for current release. | ||
* | ||
* @param value Value to be assigned as the release name. | ||
* @returns void | ||
*/ | ||
export declare function updateReleaseName(name: string): void; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
326771
5648