Skip to content

A PowerShell script and Azure Pipelines YAML to create and automate the process of adding iterations to an Azure DevOps project

License

Notifications You must be signed in to change notification settings

kunduso/add-iterations-to-azure-devops-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Image

Motivation

I start planning for the following year in the last two weeks of December. I use Azure DevOps to track my work  -break down goals into features, and features into user stories, which I map into sprints. Creating iterations and adding them to projects is something that anyone can automate.


UPDATE:
In Dec-2022, I automated the script using Azure DevOps pipeline. If you are interested, navigate to using Azure DevOps build pipeline.

Running the PowerShell script from your local?

Prerequisites

It is necessary to have an Azure DevOps organization, a project to host the iterations, and admin credentials of the project to generate PAT.

Usage

Step 1: Install Azure DevOps CLI on your local system/laptop.
Step 2: Create Azure DevOps PAT in your Azure DevOps organization.
Step 3: Identify the start date, number of days in each iteration, and number of iterations to create and add to the team.
Note: I start my sprints on Saturday and they are for 2 weeks long. I create sprints for the full year (hence 26 sprints) starting from the first Saturday of January. Therefore in 2023 the first day of the first sprint is 7th January 2023.
Step 4: Run the script from your local
createIterations.ps1 -Organization "$(Organization)" -PAT "$(PAT)" -Project "$(Project)" -TeamName "$(TeamName)" -YearOfIteration "$(YearOfIteration)" -MonthOfIteration "$(MonthOfIteration)" -StartDateOfIteration "$(StartDateOfIteration)" -NumberOfSprints "$(NumberOfSprints)"
To ceate 26 sprints starting on 7th of January 2023 the argument list would look like below:
createIterations.ps1 -Organization "$(Organization)" -PAT "$(PAT)" -Project "$(Project)" -TeamName "$(TeamName)" -YearOfIteration "2023" -MonthOfIteration "1" -StartDateOfIteration "7" -NumberOfSprints "26"
where $(Organization)="https://dev.azure.com/$(your-organization-name)/" $(Project)="$(your-project-name)" $(TeamName) = "$(your-team-name)" and I have already listed the step to create the PAT above.
Step 5: Review iterations and revoke PAT


I have supporting documentation of the legacy process (running the PowerShell script from your local) on my note at: create-azure-devops-iterations-using-powershell

Using Azure DevOps build pipeline?

Prerequisites

It is necessary to have an Azure DevOps organization, a project to host the iterations, and admin credentials of the project to generate PAT.

Usage

Step 1: Create Azure DevOps PAT
Step 2: Create a variable group to store the required variables
Step 3: Create a pipeline in Azure DevOps
Step 4: Run the pipeline in Azure DevOps
Step 5: Review iterations and revoke PAT


I have supporting documentation on my note at: automate-azure-boards-iteration-using-powershell-and-azure-pipelines

About

A PowerShell script and Azure Pipelines YAML to create and automate the process of adding iterations to an Azure DevOps project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published