Create Azure Pipeline using custom YAML

Ramakrishnan Raman 1 Reputation point
2022-11-21T14:16:21.737+00:00

We are using C# rest API to create the pipeline for multi tenant application.

string PipelineURL = string.Format("https://dev.azure.com/{0}/{1}/_apis/pipelines?api-version=6.0",  
            ConfigurationManager.AppSettings["OrganizationName"].ToString(), ConfigurationManager.AppSettings["ProjectName"].ToString());  
  
var postData = new  
            {  
                folder = "",  
                name = Name,  
                configuration = new  
                {  
                    type = "yaml",  
                    path= "/azure-pipelines.yml",  
                    repository = new  
                    {  
                        id = "repo-id",  
                        name = "repo-name",  
                        type = "azureReposGit"  
                    }  
                }  
            };  

Using above Pipeline URL and input, able to create pipeline. But how can we pass custom YAML string as input instead of path.

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,178 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 55,461 Reputation points
    2022-11-21T15:34:27.35+00:00

    Unfortunately we do not provide support for Azure DevOps here at this time. Please continue to use their official support channel defined over here.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.