{"id":16639474,"url":"https://github.com/ckadluba/validateyamlpipeline","last_synced_at":"2026-04-30T02:37:15.033Z","repository":{"id":135820783,"uuid":"480322401","full_name":"ckadluba/ValidateYamlPipeline","owner":"ckadluba","description":"A PowerShell script for automatic validation of the complete YAML source of an Azure Devops pipeline.","archived":false,"fork":false,"pushed_at":"2022-07-29T15:18:50.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-18T12:48:27.387Z","etag":null,"topics":["azure-devops","azure-pipelines","developer-tools","development","devops","powershell","tool","validation","yaml"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ckadluba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-11T09:59:24.000Z","updated_at":"2022-11-18T12:13:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"911d4a6e-b806-4d0d-9593-5be85f8053ee","html_url":"https://github.com/ckadluba/ValidateYamlPipeline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckadluba%2FValidateYamlPipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckadluba%2FValidateYamlPipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckadluba%2FValidateYamlPipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckadluba%2FValidateYamlPipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckadluba","download_url":"https://codeload.github.com/ckadluba/ValidateYamlPipeline/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243147102,"owners_count":20243747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","azure-pipelines","developer-tools","development","devops","powershell","tool","validation","yaml"],"created_at":"2024-10-12T07:06:12.691Z","updated_at":"2026-04-30T02:37:14.990Z","avatar_url":"https://github.com/ckadluba.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ValidateYamlPipeline\n\nA PowerShell script to validate the YAML files of an Azure DevOps pipeline.\n\nThe script can be used to validate a whole hierarchy of pipeline YAML. It can be used on a local git working tree of an Azure DevOps repo which contains the YAML source of an existing pipeline. \n\nTo achieve this the script automates the following actions.\n\n1. Save your local changes (git stash).\n1. Create a temporary branch and check it out.\n1. Commit your stashed changes to the temporary branch.\n1. Push the temporary branch to the origin.\n1. Call the Azure DevOps API to validate the pipeline with the given pipeline ID and the temporary branch\n1. Display the validation result.\n1. Switch back to your original branch.\n1. Restore your local changes (index and working tree from git stash).\n1. Delete the temporary branch.\n\n# Setup and Usage\n\n1. In Azure DevOps UI create a PAT token in Azure DevOps that has the permission to __execute and read__ your existing pipeline in your project.  \n   ![image](https://user-images.githubusercontent.com/10721825/162755251-70abac04-3307-48bf-8e95-0e1c11847759.png)\n   ![image](https://user-images.githubusercontent.com/10721825/162756012-7ebff55e-cb34-4a36-aae3-169ef49ad10e.png)\n1. Create the environment variable `ValidateYamlPipeline_PAT` containing the PAT token.\n   ![image](https://user-images.githubusercontent.com/10721825/162756547-502105f4-2ab4-4a43-8eee-eaa1f9141f3c.png)\n1. Get the organisation, project name and pipeline ID from the Azure DevOps UI.\n1. Make YAML changes in your local git working tree.\n1. Run the script to validate your changes.\n   ```powershell\n   .\\Validate-YamlPipeline.ps1 -OrgName \"myorganisation\" -ProjectName \"MyProject\" -PipelineId \"2342\"\n   ```\n   ![image](https://user-images.githubusercontent.com/10721825/162759738-3b9a76c9-8926-4a36-b861-9ba2d2da7fd3.png)\n\n\nSteps 1 to 3 only have to be done once while 4 and 5 would normally occur repeatedly during YAML pipeline development. \n\n# Prerequisites\n\n* PowerShell 7\n* Azure DevOps account\n* Azure DevOps git repo with YAML pipeline source\n* Azure DevOps pipeline with ID\n* Azure DevOps PAT token\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckadluba%2Fvalidateyamlpipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckadluba%2Fvalidateyamlpipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckadluba%2Fvalidateyamlpipeline/lists"}