PipelinesRestClient class
Base class that should be used (derived from) to make requests to VSS REST apis
- Extends
Constructors
Pipelines |
Methods
create |
Create a pipeline. |
get |
Get a specific artifact from a pipeline run |
get |
Get a specific log from a pipeline run |
get |
Gets a pipeline, optionally at the specified version |
get |
Gets a run for a particular pipeline. |
list |
Get a list of logs from a pipeline run. |
list |
Get a list of pipelines. |
list |
Gets top 10000 runs for a particular pipeline. |
preview(Run |
Queues a dry run of the pipeline and returns an object containing the final yaml. |
run |
Runs a pipeline. |
Constructor Details
PipelinesRestClient(IVssRestClientOptions)
Method Details
createPipeline(CreatePipelineParameters, string)
Create a pipeline.
function createPipeline(inputParameters: CreatePipelineParameters, project: string): Promise<Pipeline>
Parameters
- inputParameters
- CreatePipelineParameters
Input parameters.
- project
-
string
Project ID or project name
Returns
Promise<Pipeline>
getArtifact(string, number, number, string, GetArtifactExpandOptions)
Get a specific artifact from a pipeline run
function getArtifact(project: string, pipelineId: number, runId: number, artifactName: string, expand?: GetArtifactExpandOptions): Promise<Artifact>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
ID of the pipeline.
- runId
-
number
ID of the run of that pipeline.
- artifactName
-
string
Name of the artifact.
- expand
- GetArtifactExpandOptions
Expand options. Default is None.
Returns
Promise<Artifact>
getLog(string, number, number, number, GetLogExpandOptions)
Get a specific log from a pipeline run
function getLog(project: string, pipelineId: number, runId: number, logId: number, expand?: GetLogExpandOptions): Promise<Log>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
ID of the pipeline.
- runId
-
number
ID of the run of that pipeline.
- logId
-
number
ID of the log.
- expand
- GetLogExpandOptions
Expand options. Default is None.
Returns
Promise<Log>
getPipeline(string, number, number)
Gets a pipeline, optionally at the specified version
function getPipeline(project: string, pipelineId: number, pipelineVersion?: number): Promise<Pipeline>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
The pipeline ID
- pipelineVersion
-
number
The pipeline version
Returns
Promise<Pipeline>
getRun(string, number, number)
Gets a run for a particular pipeline.
function getRun(project: string, pipelineId: number, runId: number): Promise<Run>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
The pipeline id
- runId
-
number
The run id
Returns
Promise<Run>
listLogs(string, number, number, GetLogExpandOptions)
Get a list of logs from a pipeline run.
function listLogs(project: string, pipelineId: number, runId: number, expand?: GetLogExpandOptions): Promise<LogCollection>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
ID of the pipeline.
- runId
-
number
ID of the run of that pipeline.
- expand
- GetLogExpandOptions
Expand options. Default is None.
Returns
Promise<LogCollection>
listPipelines(string, string, number, string)
Get a list of pipelines.
function listPipelines(project: string, orderBy?: string, top?: number, continuationToken?: string): Promise<Pipeline[]>
Parameters
- project
-
string
Project ID or project name
- orderBy
-
string
A sort expression. Defaults to "name asc"
- top
-
number
The maximum number of pipelines to return
- continuationToken
-
string
A continuation token from a previous request, to retrieve the next page of results
Returns
Promise<Pipeline[]>
listRuns(string, number)
Gets top 10000 runs for a particular pipeline.
function listRuns(project: string, pipelineId: number): Promise<Run[]>
Parameters
- project
-
string
Project ID or project name
- pipelineId
-
number
The pipeline id
Returns
Promise<Run[]>
preview(RunPipelineParameters, string, number, number)
Queues a dry run of the pipeline and returns an object containing the final yaml.
function preview(runParameters: RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<PreviewRun>
Parameters
- runParameters
- RunPipelineParameters
Optional additional parameters for this run.
- project
-
string
Project ID or project name
- pipelineId
-
number
The pipeline ID.
- pipelineVersion
-
number
The pipeline version.
Returns
Promise<PreviewRun>
runPipeline(RunPipelineParameters, string, number, number)
Runs a pipeline.
function runPipeline(runParameters: RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<Run>
Parameters
- runParameters
- RunPipelineParameters
Optional additional parameters for this run.
- project
-
string
Project ID or project name
- pipelineId
-
number
The pipeline ID.
- pipelineVersion
-
number
The pipeline version.
Returns
Promise<Run>