Task 02: Create source control project
DOCUMENT CATEGORY: Runbook Step
SCOPE: Source control project creation
PURPOSE: Create deployment source control project from Azure Local template
MASTER REFERENCE: Source Control Project Setup Guide
Status: Active
Objective
Create a new source control project/repository for the deployment using the Azure Local template.
Prerequisites
- Bootstrap complete (Task 01)
- Source control platform access (GitHub, GitLab, or Azure DevOps)
Procedure
- GitHub
- GitLab
- Azure DevOps
Create Repository from Template
- Navigate to the Azure Local organization on GitHub
- Open the desired template repository
- Click Use this template → Create a new repository
- Configure:
| Field | Value |
|---|---|
| Owner | Your organization |
| Repository name | <org>-azurelocal (e.g. iic-azurelocal) |
| Visibility | Private |
- Click Create repository
- Wait for repository creation to complete
Tip: If using GitHub Teams, move the repository to the appropriate team after creation via Settings → Manage access.
Create Project from Template
- Navigate to your organization's group in GitLab
- Click the + in the top-left corner → New project/repository
- Select Create from template
- Select the Group heading
- Click Use template for the Azure Local template
- Configure:
| Field | Value |
|---|---|
| Project name | <org>-azurelocal (e.g. iic-azurelocal) |
| Project URL | Your organization's group path |
| Visibility | Private |
- Click Create project
- Wait for project creation (may take a few minutes)
Create Project and Repository
- Navigate to Azure DevOps and select your organization
- Click + New project
- Configure:
| Field | Value |
|---|---|
| Project name | <org>-azurelocal (e.g. iic-azurelocal) |
| Visibility | Private |
| Version control | Git |
| Work item process | Agile (or your org standard) |
- Click Create
Initialize from Template
- In the new project, go to Repos → Files
- Click Import a repository
- Enter the Azure Local template repository URL
- Click Import and wait for completion
Verification
- Project/repository created successfully
- Project appears in the correct group/organization
- Project name follows your organization's naming convention
- Template content is present in the repository
Next Steps
References
- GitHub
- GitLab
- Azure DevOps
Values from infrastructure.yml
The script reads the devops section (platform, organization, project and repository: name, template, visibility, default branch) of infrastructure.yml (schema 5). Each key, with its type, default and example, is in the variables reference.
The toolkit script for this task is PowerShell 7. It reads infrastructure.yml through the mandatory -InfrastructureFile parameter and never prompts. It ends with exit code 0, 1 or 2. Run it with -WhatIf first: the script reads what exists and lists what it would do.
Script
| Script | What it does |
|---|---|
scripts/deploy/01-cicd-infra/phase-01-cicd-setup/task-02-create-project/powershell/New-CicdProject.ps1 | Task 02. Creates the deployment repository or project from the Azure Local template. Supports -WhatIf. |
Requires: PowerShell 7.
Run
./New-CicdProject.ps1 -InfrastructureFile ./infrastructure.yml -WhatIf
Alternatives
The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.
Navigation
| Previous | Up | Next |
|---|---|---|
| ← Task 01: Bootstrap | Phase 01: CI/CD Setup | Task 03: Configure Project Settings -> |
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
| Repository creation fails | Insufficient permissions on source control platform | Verify account has project/repo creation rights |
| Template not available | Organization template restrictions | Contact platform administrator to enable templates |
Version Control
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2025-03-25 | Azure Local Cloud | Initial release |