azure-devops-python-api icon indicating copy to clipboard operation
azure-devops-python-api copied to clipboard

Update CreatePipelineConfigurationParameters model

Open mel-cdn opened this issue 4 years ago • 2 comments

In the current state, I'm receiving below error when using the create_pipeline since the serialized payload is not correct. "This API does not support creating pipelines of configuration type Yaml."

Update the model required to create new pipeline.

mel-cdn avatar Feb 14 '22 15:02 mel-cdn

This field might be case sensitive, did you try lower case yaml?

https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/create?view=azure-devops-rest-6.0#configurationtype

Also path and repository are not parameters in that model for v6.0. Which server did you generate the model code from?

https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/create?view=azure-devops-rest-6.0#createpipelineconfigurationparameters

Was it on-prem or Azure DevOps, and which version?

tonybaloney avatar Oct 31 '22 07:10 tonybaloney

Even Azure's own documentation is wildly out of date here.

The current HTTP body schema I've found for 7.0 guaranteed to work for the endpoint referenced in the docs above

"name": "pipeline-name",
"configuration": {
    "type": "yaml",
    "path": "pipline.yaml",
    "repository": {
        "id": "my-repo-guid",
        "type": "azureReposGit",
        "name": "repo-name"
    }
},
"folder": "path/to/my/pipeline",

GarrettGeorge avatar May 02 '23 02:05 GarrettGeorge