Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 8cec044

Browse files
Merge pull request #60 from microsoft/TemplateBuilderDocument
Add user manual for Azure DevOps template management
2 parents 1001601 + 0bbe208 commit 8cec044

1 file changed

Lines changed: 132 additions & 0 deletions

File tree

docs/TemplateBuilder.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# User Manual for Template Extraction and Project Creation in Azure DevOps
2+
3+
## Overview
4+
5+
This document provides step-by-step instructions on how to extract a template from an existing Azure DevOps project and use the extracted template to create a new project.
6+
7+
---
8+
9+
## Prerequisites
10+
11+
1. Ensure the following are installed on your machine:
12+
- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
13+
- [Visual Studio](https://visualstudio.microsoft.com/) or any other preferred IDE.
14+
2. Ensure you have access to an Azure DevOps organization and the necessary permissions to create projects and extract templates.
15+
3. Have a valid Azure DevOps Personal Access Token (PAT) or be ready to authenticate using Azure AD.
16+
17+
---
18+
19+
## Template Extraction
20+
21+
### Step 1: Start the Application
22+
1. Run the `ADOGenerator` application.
23+
2. You will see the following prompt:
24+
```
25+
Welcome to Azure DevOps Demo Generator! This tool will help you generate a demo environment for Azure DevOps.
26+
```
27+
28+
### Step 2: Select Template Extraction
29+
1. Choose the option to generate new artifacts using an existing project:
30+
```
31+
Do you want to create a new template or create a new project using the demo generator project template?
32+
1. Create a new project using the demo generator project template
33+
2. Generate new artifacts using an existing project.
34+
Enter the option number from the list of options above:
35+
```
36+
2. Enter `2` and press `Enter`.
37+
38+
### Step 3: Authenticate
39+
1. Choose your authentication method:
40+
```
41+
Choose authentication method: 1. Device Login using AD auth 2. Personal Access Token (PAT)
42+
```
43+
2. Enter `1` for Azure AD authentication or `2` for PAT authentication.
44+
- For PAT authentication:
45+
- Enter your Azure DevOps organization name.
46+
- Enter your PAT when prompted.
47+
48+
### Step 4: Select an Existing Project
49+
1. The application will list the available projects in your Azure DevOps organization.
50+
2. Select the project you want to extract the template from.
51+
52+
### Step 5: Analyze and Generate Artifacts
53+
1. The application will analyze the selected project and prompt:
54+
```
55+
Do you want to create artifacts yes/no:
56+
```
57+
2. Enter `yes` to generate the artifacts.
58+
3. The application will extract the following:
59+
- Work items
60+
- Build and release definitions
61+
- Iterations
62+
- Teams
63+
- Service endpoints
64+
4. The extracted artifacts will be saved in the `Templates` directory under a folder named `CT-<ProjectName>`.
65+
66+
---
67+
68+
## Using the Extracted Template to Create a New Project
69+
70+
### Step 1: Start the Application
71+
1. Run the `ADOGenerator` application.
72+
2. You will see the following prompt:
73+
```
74+
Welcome to Azure DevOps Demo Generator! This tool will help you generate a demo environment for Azure DevOps.
75+
```
76+
77+
### Step 2: Select Project Creation
78+
1. Choose the option to create a new project:
79+
```
80+
Do you want to create a new template or create a new project using the demo generator project template?
81+
1. Create a new project using the demo generator project template
82+
2. Generate new artifacts using an existing project.
83+
Enter the option number from the list of options above:
84+
```
85+
2. Enter `1` and press `Enter`.
86+
87+
### Step 3: Authenticate
88+
1. Choose your authentication method:
89+
```
90+
Choose authentication method: 1. Device Login using AD auth 2. Personal Access Token (PAT)
91+
```
92+
2. Enter `1` for Azure AD authentication or `2` for PAT authentication.
93+
- For PAT authentication:
94+
- Enter your Azure DevOps organization name.
95+
- Enter your PAT when prompted.
96+
97+
### Step 4: Select a Template
98+
1. The application will display the available templates in the `Templates` directory.
99+
2. Select the template you want to use by entering its corresponding number.
100+
101+
### Step 5: Enter Project Details
102+
1. Enter the name of the new project when prompted:
103+
```
104+
Enter the new project name:
105+
```
106+
107+
### Step 6: Confirm Extension Installation
108+
1. If the selected template requires extensions, the application will display the required extensions and ask for confirmation:
109+
```
110+
Do you want to proceed with this extension? (yes/No): press enter to confirm
111+
```
112+
113+
### Step 7: Create the Project
114+
1. The application will create the project in Azure DevOps using the selected template.
115+
2. Once the project is created, you will see the following message:
116+
```
117+
Project created successfully.
118+
```
119+
120+
---
121+
122+
## Additional Notes
123+
124+
- If you encounter any issues during template extraction or project creation, check the console output for error messages.
125+
- Ensure that the `TemplateSetting.json` file is present in the `Templates` directory for the application to load templates.
126+
- If you skip updating the template settings, you can manually copy the generated artifacts and update the `TemplateSetting.json` file.
127+
128+
---
129+
130+
## Support
131+
132+
For further assistance, refer to the SUPPORT.md file in the repository or contact the project maintainers.

0 commit comments

Comments
 (0)