tomaustin700 / YAML-Pipeline-Validator-VS-Code-Extension

Azure DevOps YAML Pipeline Validator Extension for VS Code
https://marketplace.visualstudio.com/items?itemName=TomAustin.azure-devops-yaml-pipeline-validator
2 stars 5 forks source link

Repository Resource Names Fail to Parse Preceding Project Name #9

Closed ZachStephens closed 3 years ago

ZachStephens commented 3 years ago

Describe the bug

In a repo named "myreponame" I have a pipeline that declares itself as a repository resource. Declared as such:

Running the validator I recieve an alert "TF200016 The following project does not exists: MyProject. Verify that the name does exists and that the project exists on the specified Azure Devops Server"

To Reproduce Declare a repo resource with a project preceding the repo in the name property

Expected behavior The validator should throw this error.

**Example yaml

Additional context Recently installed the extension and connected to azure devops via a PAT

tomaustin700 commented 3 years ago

Hi @ZachStephens, as you are using a PAT have you also set yamlpipelinesvalidator.builddefinitionid and yamlpipelinesvalidator.projecturl? Thanks

tomaustin700 commented 3 years ago

@ZachStephens I was able to duplicate the issue you were having when yamlpipelinesvalidator.builddefinitionid and yamlpipelinesvalidator.projecturl were not set but the PAT was, once set everything validated as I'd expect. If you want some more info about what these settings should be set to you can check out #2. You should end up with something like this:

    "yamlpipelinesvalidator.builddefinitionid": "205",
    "yamlpipelinesvalidator.projecturl": "https://dev.azure.com/User/Project",
    "yamlpipelinesvalidator.pat": "fdjkgndfkgndfkjndfkjngjdfngdfgmn"

Can you let me know how you get one once those two are set? Cheers

ZachStephens commented 3 years ago

Ah thanks for the quick help. This was an oversight on my part