azure-devopsazure-pipelinesazure-devops-rest-api

No template with an identifier of 'xamarinandroid' could be found


Could not find a question about this, and just spent 1 day figuring this out, so as community service:

Trying to create new Pipeline in a private Azure Devops project always results in the following error: No template with an identifier of 'xamarinandroid' could be found.

create pipeline, configure step

My repository has nothing to do with Xamarin. There are no options to choose from and I cannot finish pipeline creation.

How can I create a new Pipeline?


Solution

  • for people using the restclient extension in vscode (I'm not 100% certain but I thing there is also one for visual studio), here is an example of an *.http file to create a pipeline based on the answer by tonsteri

    @token=your-actual-personal-access-token
    @organization=your-organization
    @project=your-project
    @repositoryName=your-repository-name
    @repositoryId=the-id-of-the-repository
    
    ### Create Pipeline and organize into folder /Publish or set to null
    POST https://dev.azure.com/{{organization}}/{{project}}/_apis/pipelines/?api-version=7.1
    content-type: application/json
    Authorization: Bearer {{token}}
    
    {
        "folder": "/Publish",
        "name": "the-name-of-the-pipeline",
        "configuration": {
          "type": "yaml",
          "path": "the-path-to-the-pipeline-yml-file",
          "repository": {
            "id": "{{repositoryId}}",
            "name": "{{repositoryName}}",
            "type": "azureReposGit"
          }
        }
    }
    

    copy, save as *.http file in vscode and then you should be able to click on the "Send Request" enter image description here