Package org.azd.pipelines
Class PipelinesApi
- All Implemented Interfaces:
PipelinesDetails
PipelinesApi class to manage Pipelines API
-
Constructor Summary
ConstructorsConstructorDescriptionPipelinesApi(Connection connection) Pass the connection object to work with Pipelines Api -
Method Summary
Modifier and TypeMethodDescriptioncreatePipeline(String name, String folder, String pathOfYamlFile, String repositoryId, String repositoryName) Create a pipeline.getArtifacts(int pipelineId, int runId, String artifactName) Get a specific artifact from a pipeline rungetArtifacts(int pipelineId, int runId, String artifactName, PipelinesExpandOptions expandOptions) Get a specific artifact from a pipeline rungetPipeline(int pipelineId) Gets a pipeline, optionally at the specified versiongetPipeline(int pipelineId, String pipelineVersion) Gets a pipeline, optionally at the specified versiongetPipelineLog(int pipelineId, int runId, int logId) Get a specific log from a pipeline rungetPipelineLog(int pipelineId, int runId, int logId, PipelinesExpandOptions expandOptions) Get a specific log from a pipeline rungetPipelineLogs(int pipelineId, int runId) Get a list of logs from a pipeline run.getPipelineLogs(int pipelineId, int runId, PipelinesExpandOptions expandOptions) Get a list of logs from a pipeline run.getPipelineRun(int pipelineId, int runId) Gets a run for a particular pipeline.getPipelineRuns(int pipelineId) Gets top 10000 runs for a particular pipeline.Get a list of pipelines.previewPipeline(int pipelineId, boolean previewRun) Queues a dry run of the pipeline and returns an object containing the final yaml.previewPipeline(int pipelineId, boolean previewRun, String yamlOverride) Queues a dry run of the pipeline and returns an object containing the final yaml.runPipeline(int pipelineId) Runs a pipeline.runPipeline(int pipelineId, Map pipelineRunParameters) Runs a pipeline.Methods inherited from class org.azd.utils.AzDAsyncApi
createAsync
-
Constructor Details
-
PipelinesApi
Pass the connection object to work with Pipelines Api- Parameters:
connection- Connection object
-
-
Method Details
-
getArtifacts
public PipelinesArtifact getArtifacts(int pipelineId, int runId, String artifactName) throws AzDException Get a specific artifact from a pipeline run- Specified by:
getArtifactsin interfacePipelinesDetails- Parameters:
pipelineId- ID of the pipeline.runId- ID of the run of that pipeline.artifactName- Name of the artifact.- Returns:
- PipelinesArtifact object
PipelinesArtifact - Throws:
AzDException- Default Api Exception handler.
-
getArtifacts
public PipelinesArtifact getArtifacts(int pipelineId, int runId, String artifactName, PipelinesExpandOptions expandOptions) throws AzDException Get a specific artifact from a pipeline run- Specified by:
getArtifactsin interfacePipelinesDetails- Parameters:
pipelineId- ID of the pipeline.runId- ID of the run of that pipeline.artifactName- Name of the artifact.expandOptions- Expand options. Default is None.PipelinesExpandOptions- Returns:
- PipelinesArtifact object
PipelinesArtifact - Throws:
AzDException- Default Api Exception handler.
-
getPipelineLog
Get a specific log from a pipeline run- Specified by:
getPipelineLogin interfacePipelinesDetails- Parameters:
pipelineId- ID of the pipeline.runId- ID of the run of that pipeline.logId- ID of the log.- Returns:
- PipelineLog object
PipelineLog - Throws:
AzDException- Default Api Exception handler.
-
getPipelineLog
public PipelineLog getPipelineLog(int pipelineId, int runId, int logId, PipelinesExpandOptions expandOptions) throws AzDException Get a specific log from a pipeline run- Specified by:
getPipelineLogin interfacePipelinesDetails- Parameters:
pipelineId- ID of the pipeline.runId- ID of the run of that pipeline.logId- ID of the log.expandOptions- Expand options. Default is None.PipelinesExpandOptions- Returns:
- PipelineLog object
PipelineLog - Throws:
AzDException- Default Api Exception handler.
-
getPipelineLogs
Get a list of logs from a pipeline run.- Specified by:
getPipelineLogsin interfacePipelinesDetails- Parameters:
pipelineId- ID of the pipeline.runId- ID of the run of that pipeline.- Returns:
- LogCollection object
LogCollection - Throws:
AzDException- Default Api Exception handler.
-
getPipelineLogs
public LogCollection getPipelineLogs(int pipelineId, int runId, PipelinesExpandOptions expandOptions) throws AzDException Get a list of logs from a pipeline run.- Specified by:
getPipelineLogsin interfacePipelinesDetails- Parameters:
pipelineId- ID of the pipeline.runId- ID of the run of that pipeline.expandOptions- Expand options. Default is None.PipelinesExpandOptions- Returns:
- LogCollection object
LogCollection - Throws:
AzDException- Default Api Exception handler.
-
createPipeline
public Pipeline createPipeline(String name, String folder, String pathOfYamlFile, String repositoryId, String repositoryName) throws AzDException Create a pipeline.- Specified by:
createPipelinein interfacePipelinesDetails- Parameters:
name- Name of the pipeline.folder- Folder of the pipeline.pathOfYamlFile- Path of azure-pipelines.yaml file in the repository.repositoryId- Id of the repositoryrepositoryName- Name of the repository- Returns:
- Pipeline object
Pipeline - Throws:
AzDException- Default Api Exception handler.
-
getPipeline
Gets a pipeline, optionally at the specified version- Specified by:
getPipelinein interfacePipelinesDetails- Parameters:
pipelineId- The pipeline ID- Returns:
- Pipeline object
Pipeline - Throws:
AzDException- Default Api Exception handler.
-
getPipeline
Gets a pipeline, optionally at the specified version- Specified by:
getPipelinein interfacePipelinesDetails- Parameters:
pipelineId- The pipeline IDpipelineVersion- The pipeline version- Returns:
- Pipeline object
Pipeline - Throws:
AzDException- Default Api Exception handler.
-
getPipelines
Get a list of pipelines.- Specified by:
getPipelinesin interfacePipelinesDetails- Returns:
- Pipelines
Pipelines - Throws:
AzDException- Default Api Exception handler.
-
previewPipeline
Queues a dry run of the pipeline and returns an object containing the final yaml.- Specified by:
previewPipelinein interfacePipelinesDetails- Parameters:
pipelineId- The pipeline ID.previewRun- If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.- Returns:
- PreviewRun object
PreviewRun - Throws:
AzDException- Default Api Exception handler.
-
previewPipeline
public PreviewRun previewPipeline(int pipelineId, boolean previewRun, String yamlOverride) throws AzDException Queues a dry run of the pipeline and returns an object containing the final yaml.- Specified by:
previewPipelinein interfacePipelinesDetails- Parameters:
pipelineId- The pipeline ID.previewRun- If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.yamlOverride- If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file.- Returns:
- PreviewRun object
PreviewRun - Throws:
AzDException- Default Api Exception handler.
-
getPipelineRun
Gets a run for a particular pipeline.- Specified by:
getPipelineRunin interfacePipelinesDetails- Parameters:
pipelineId- The pipeline idrunId- The run id- Returns:
- Pipeline run object
PipelineRun - Throws:
AzDException- Default Api Exception handler.
-
getPipelineRuns
Gets top 10000 runs for a particular pipeline.- Specified by:
getPipelineRunsin interfacePipelinesDetails- Parameters:
pipelineId- The pipeline id- Returns:
- a list of pipeline run object
PipelineRuns - Throws:
AzDException- Default Api Exception handler.
-
runPipeline
Runs a pipeline.- Specified by:
runPipelinein interfacePipelinesDetails- Parameters:
pipelineId- The pipeline id- Returns:
- a pipeline run object
PipelineRun - Throws:
AzDException- Default Api Exception handler.
-
runPipeline
Runs a pipeline.- Specified by:
runPipelinein interfacePipelinesDetails- Parameters:
pipelineId- The pipeline idpipelineRunParameters- a map of request parameters.- Returns:
- a pipeline run object
PipelineRun - Throws:
AzDException- Default Api Exception handler.
-