PipelinesRestClient class
Classe di base da usare (derivata da) per effettuare richieste alle API REST vss
- Extends
Costruttori
| Pipelines |
Metodi
| create |
Creare una pipeline. |
| get |
Ottenere un artefatto specifico da un'esecuzione della pipeline |
| get |
Ottenere un log specifico da un'esecuzione della pipeline |
| get |
Ottiene una pipeline, facoltativamente nella versione specificata |
| get |
Ottiene un'esecuzione per una determinata pipeline. |
| list |
Ottenere un elenco di log da un'esecuzione della pipeline. |
| list |
Ottenere un elenco di pipeline. |
| list |
Ottiene le prime 10000 esecuzioni per una determinata pipeline. |
| preview(Run |
Accoda un'esecuzione di prova della pipeline e restituisce un oggetto contenente il file yaml finale. |
| run |
Esegue una pipeline. |
Dettagli costruttore
PipelinesRestClient(IVssRestClientOptions)
Dettagli metodo
createPipeline(CreatePipelineParameters, string)
Creare una pipeline.
function createPipeline(inputParameters: CreatePipelineParameters, project: string): Promise<Pipeline>
Parametri
- inputParameters
- CreatePipelineParameters
Parametri di input.
- project
-
string
ID progetto o nome progetto
Restituisce
Promise<Pipeline>
getArtifact(string, number, number, string, GetArtifactExpandOptions)
Ottenere un artefatto specifico da un'esecuzione della pipeline
function getArtifact(project: string, pipelineId: number, runId: number, artifactName: string, expand?: GetArtifactExpandOptions): Promise<Artifact>
Parametri
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
ID della pipeline.
- runId
-
number
ID dell'esecuzione di tale pipeline.
- artifactName
-
string
Nome dell'artefatto.
- expand
- GetArtifactExpandOptions
Espandi le opzioni. Il valore predefinito è Nessuno.
Restituisce
Promise<Artifact>
getLog(string, number, number, number, GetLogExpandOptions)
Ottenere un log specifico da un'esecuzione della pipeline
function getLog(project: string, pipelineId: number, runId: number, logId: number, expand?: GetLogExpandOptions): Promise<Log>
Parametri
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
ID della pipeline.
- runId
-
number
ID dell'esecuzione di tale pipeline.
- logId
-
number
ID del registro.
- expand
- GetLogExpandOptions
Espandi le opzioni. Il valore predefinito è Nessuno.
Restituisce
Promise<Log>
getPipeline(string, number, number)
Ottiene una pipeline, facoltativamente nella versione specificata
function getPipeline(project: string, pipelineId: number, pipelineVersion?: number): Promise<Pipeline>
Parametri
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
The pipeline ID
- pipelineVersion
-
number
La versione della pipeline
Restituisce
Promise<Pipeline>
getRun(string, number, number)
Ottiene un'esecuzione per una determinata pipeline.
function getRun(project: string, pipelineId: number, runId: number): Promise<Run>
Parametri
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
ID della pipeline
- runId
-
number
L'ID dell'esecuzione
Restituisce
Promise<Run>
listLogs(string, number, number, GetLogExpandOptions)
Ottenere un elenco di log da un'esecuzione della pipeline.
function listLogs(project: string, pipelineId: number, runId: number, expand?: GetLogExpandOptions): Promise<LogCollection>
Parametri
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
ID della pipeline.
- runId
-
number
ID dell'esecuzione di tale pipeline.
- expand
- GetLogExpandOptions
Espandi le opzioni. Il valore predefinito è Nessuno.
Restituisce
Promise<LogCollection>
listPipelines(string, string, number, string)
Ottenere un elenco di pipeline.
function listPipelines(project: string, orderBy?: string, top?: number, continuationToken?: string): Promise<Pipeline[]>
Parametri
- project
-
string
ID progetto o nome progetto
- orderBy
-
string
Un'espressione di ordinamento. Il valore predefinito è "name asc"
- top
-
number
Il numero massimo di pipeline da restituire
- continuationToken
-
string
Un token di continuazione da una richiesta precedente, per recuperare la pagina successiva dei risultati
Restituisce
Promise<Pipeline[]>
listRuns(string, number)
Ottiene le prime 10000 esecuzioni per una determinata pipeline.
function listRuns(project: string, pipelineId: number): Promise<Run[]>
Parametri
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
ID della pipeline
Restituisce
Promise<Run[]>
preview(RunPipelineParameters, string, number, number)
Accoda un'esecuzione di prova della pipeline e restituisce un oggetto contenente il file yaml finale.
function preview(runParameters: RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<PreviewRun>
Parametri
- runParameters
- RunPipelineParameters
Parametri aggiuntivi facoltativi per questa esecuzione.
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
ID pipeline.
- pipelineVersion
-
number
Versione della pipeline.
Restituisce
Promise<PreviewRun>
runPipeline(RunPipelineParameters, string, number, number)
Esegue una pipeline.
function runPipeline(runParameters: RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<Run>
Parametri
- runParameters
- RunPipelineParameters
Parametri aggiuntivi facoltativi per questa esecuzione.
- project
-
string
ID progetto o nome progetto
- pipelineId
-
number
ID pipeline.
- pipelineVersion
-
number
Versione della pipeline.
Restituisce
Promise<Run>