Open jwikman opened 4 years ago
Hi,
I've the same issue. How can I do a workaround to that?
Best regards,
@jarpsimoes I worked around this by using DevOps API for this instead: https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/create?view=azure-devops-rest-5.1
I've gotten this problem when using a tfsgit
repository type where the repository URL had a space in it. I fixed it by renaming the URL such that it doesn't have a space.
From "Repos":
@jwikman How did you manage to use the API you linked to create a pipeline based on a YAML definition? I do not see any parts of the body to do so. There is also https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/create?view=azure-devops-rest-6.1, but doc seems broken as body is inconsistent and I was not successful either. Also tried to snif it from the UI, but as you said it is using neither of the documented APIs for it.
Hi, can confirm that this issue is still present.
Cannot create a pipeline with yaml file from a repo in another Project
Command Name
az pipelines create Extension Name: azure-devops. Version: 0.18.0.
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az pipelines create
to create a pipeline in Project2 with yaml pipeline from Project1/Repo1. Use the git clone url asrepository
parameteraz pipelines create --name {} --org {} --project {} --repository {} --yml-path {} --branch {} --output {} --skip-first-run {} --debug
The 404 error seems to come from a http GET to list repos, and it tries to list Repo1 in Project2 hence the 404 (file not found) error:
GET https://dev.azure.com/[org]/[Project2]/_apis/git/repositories/[Repo1]
Expected Behavior
The pipeline should be created in Project2, but the yaml pipeline definition will stay in Repo1 in Project1. This is now only possible in the UI. Since I'm using the git clone url of the repo, all needed info is provided.
Environment Summary