Programmatically Create Azure Pipelines
This script New-AzPipeline lets you programmatically create Azure Pipelines based on your folder structure.
It browses through your folder structure for pipeline.yml files and creates corresponding Azure Pipelines in Azure DevOps. It has several features like creating pipelines based on a specific folder/module version, latest version or just creates all. It also compares against existing Pipelines and skips these.
The script New-AzPipeline.ps1 can be found here.
A newer version is in progress already and will be available soon. Check out our Scripts repository for any future updates.
- OrganizationName (Azure DevOps Organization)
- ProjectName (Azure DevOps Project)
- RepositoryName (Azure DevOps Repository)
- FolderPath (Azure Pipelines folder path)
- Version (Pipeline versions to be used)
- PipelinePath (Local folder path to be browsed)
- Latest (Latest Pipeline versions to be created)
- All (All Pipeline versions to be created)
.\New-AzPipeline.ps1 -OrganizationName <OrganizationName> -ProjectName <ProjectName> -RepositoryName <RepositoryName> -Latest
- Azure DevOps Login (az devops login) or Azure Login (az login / Connect-AzAccount)
- Azure DevOps Organization
- Azure DevOps Project
- Azure DevOps Repository
Contributor (Azure DevOps)
Base Folder Structure
Based on this structure
Module1as Pipeline names
2020-04-20as corresponding versions
- Azure Pipelines based on
Thanks to @simonbms for helping me out with the object comparions in order to have only the latest folders picked for the