I am writing a BASH script, where its creating an azure repo and then pushing code. post this step it will go-ahead and create an azure pipeline via azure-pipeline.yaml
file present in the Azure repo.
At this step we need to pass the repository ID in-order to create the pipeline, but issue here is I can't keep it as a user input as it will be getting created within script itself, now I am struck with this.
Is there any way that we can get the repo id from the newly created repo directly within the script?
https://dev.azure.com/{{organization}}/{{project}}/_apis/pipelines?api-version=6.0-preview.1
{
"folder": "Folder-Name",
"name": "Pipeline-Name",
"configuration": {
"type": "yaml",
"path": "azure-pipelines.yml",
"repository": {
"id": "Repo-ID",
"name": "Repo-Name",
"type": "azureReposGit"
}
}
}