-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test-VSTeamYamlPipeline fails if no pipeline runs on master/main exist #428
Comments
Thanks for the report @hvl71 it checked it and it is per se not a bug with the cmdlet, but implemented incomplete in regards to the API. Also documenting it for myself here. So, I had the following setup:
Following error I get:
Warning is different but comes down to the same problem. When calling the following API endpoint: You can give the pipeline Id. If you don't specify anything else, it tries to do the test against the branch which is named "main" of the repo. Additionally, I tried to switch the default branch to
How to resolve it?
and it sends an object like the following which is mostly empty and always seems to have only one resource in it: {
"resources": {
"pipelines": {},
"repositories": {
"self": {
"refName": "dev"
}
},
"builds": {},
"containers": {},
"packages": {}
},
"templateParameters": {},
"previewRun": true,
"yamlOverride": "YAML Code here"
} |
I reported that problem to the support: |
Hi
We encounter an issue when trying to validate a yaml pipeline using the Test-VSTeamYamlPipeline cmdlet.
We run:
Result:
We see the behaviour on both versions we have tried (7.2.0 and 7.4.0)
We have observed that our PipelineId only has pipeline runs on our development branch. We have never run the pipeline on our master branch (we don't have a main branch).
If we validate the yaml agains another PipelineId which has had a pipeline run against the relevant master branch, the yaml validates fine.
Steps to reproduce
Validate a known valid yaml pipeline against a PipelineId that have no pipeline runs on master or main in Azure Devops Service
Expected behavior
Yaml validates without errors or fails with more clear error message about reason
Actual behavior:
Environment data: Windows 10
Server: Azure DevOps Service
The text was updated successfully, but these errors were encountered: