Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 246 additions & 0 deletions .github/WORKFLOW_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
# Git Workflow Guide for AzureNamingTool Development

## Branch Structure

### Your Fork (BryanSoltis/AzureNamingTool-DEV)
- `main` - Clean history (no large files), synced with your work
- `dev` - Development branch, synced with upstream mspnp/dev
- `feature/*` - Feature branches for new work

### Upstream (mspnp/AzureNamingTool)
- `main` - Production releases
- `dev` - Development/staging branch

## Workflow

### 1. Starting New Work

```powershell
# Ensure you're on dev and it's up to date with upstream
git checkout dev
git fetch upstream
git merge upstream/dev
git push origin dev

# Create a feature branch
git checkout -b feature/your-feature-name
```

### 2. During Development

```powershell
# Make your changes and commit
git add .
git commit -m "Your commit message"

# Push to your fork
git push origin feature/your-feature-name
```

### 3. PR to Your Fork's Dev

```powershell
# Create PR: feature/your-feature-name → BryanSoltis/dev
# Review and merge via GitHub UI
```

### 4. PR to Upstream Dev

```powershell
# After merging to your dev, create PR:
# BryanSoltis/dev → mspnp/dev
# This will be reviewed by upstream maintainers
```

### 5. Upstream Releases Main

```powershell
# Upstream team creates PR: mspnp/dev → mspnp/main
# After release, sync your fork
git checkout main
git fetch upstream
git merge upstream/main
git push origin main
```

## Fixing Current Situation

### Problem
The history rewrite (removing large zip files) made your branches incompatible with upstream.

### Solution

#### Option 1: Reset to Upstream History (Recommended)
```powershell
# Backup your current work
git branch backup-main main
git branch backup-dev dev

# Reset to upstream (keeps large files in history)
git fetch https://github.com/mspnp/AzureNamingTool.git
git checkout main
git reset --hard FETCH_HEAD
git push origin main --force-with-lease

git checkout dev
git fetch https://github.com/mspnp/AzureNamingTool.git dev
git reset --hard FETCH_HEAD
git push origin dev --force-with-lease

# Create new feature branch with your v5.0.0 work
git checkout -b feature/v5.0.0-updates dev
# Manually apply your changes or cherry-pick from backup branches
```

#### Option 2: Continue with Clean History (Your Fork Only)
Keep your current clean history but create a separate branch for upstream PRs:

```powershell
# Add upstream remote
git remote add upstream https://github.com/mspnp/AzureNamingTool.git

# Create upstream-compatible branch
git fetch upstream dev
git checkout -b upstream-dev upstream/dev

# Manually apply your v5.0.0 changes to this branch
# (Copy files, commit, push)
git push origin upstream-dev

# PR: BryanSoltis/upstream-dev → mspnp/dev
```

## Daily Workflow (After Fix)

### Working on a new feature
```powershell
git checkout dev
git pull origin dev
git checkout -b feature/new-awesome-feature
# ... make changes ...
git commit -am "Add awesome feature"
git push origin feature/new-awesome-feature
```

### Create PR to your dev via GitHub UI
- Go to GitHub
- Create PR: `feature/new-awesome-feature` → `BryanSoltis/dev`
- Review and merge

### Create PR to upstream
- Ensure your `dev` is merged
- Go to upstream repo: https://github.com/mspnp/AzureNamingTool
- Click "New Pull Request"
- Set base: `mspnp/dev`, compare: `BryanSoltis/dev`
- Fill in description and submit

## CI/CD Recommendations

### Add .gitignore for large files
```gitignore
# Deployment artifacts
*.zip
publish/
publish-output/
TestResults/
app-logs/
deploy/

# Keep small test files
!tests/**/*.zip
```

### Add GitHub Actions for automated deployment
Create `.github/workflows/build-and-deploy.yml`:

```yaml
name: Build and Deploy

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore src/AzureNamingTool.csproj
- name: Build
run: dotnet build src/AzureNamingTool.csproj --no-restore -c Release
- name: Test
run: dotnet test tests/AzureNamingTool.UnitTests/AzureNamingTool.UnitTests.csproj --no-build -c Release
```

## Deployment Strategy

### For Azure App Service
Use GitHub Actions to build and deploy directly to Azure:

```yaml
- name: Publish
run: dotnet publish src/AzureNamingTool.csproj -c Release -o ./publish

- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ secrets.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ./publish
```

### For Docker
Build and push to container registry:

```yaml
- name: Build Docker image
run: docker build -t your-registry/azurenamingtool:${{ github.sha }} .

- name: Push to registry
run: docker push your-registry/azurenamingtool:${{ github.sha }}
```

## Best Practices

1. **Never commit large files** - Add to .gitignore first
2. **Small, focused commits** - Easier to review and revert
3. **Descriptive commit messages** - Explain why, not just what
4. **Test before PR** - Run build and tests locally
5. **Keep dev in sync** - Regularly pull from upstream
6. **Use feature branches** - Never commit directly to dev or main
7. **Review your own PR first** - Check the diff before requesting review

## Useful Git Commands

```powershell
# See what changed
git status
git diff

# Undo unstaged changes
git restore <file>

# Undo last commit (keep changes)
git reset --soft HEAD~1

# Update from upstream
git fetch upstream
git merge upstream/dev

# Clean up old branches
git branch -d feature/old-branch
git push origin --delete feature/old-branch

# See branch history
git log --oneline --graph --all

# Find large files in history
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | awk '/^blob/ {print $2, $3, $4}' | sort -k2 -n
```
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,9 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Deployment artifacts
deploy*.zip
app-logs/
app-logs.zip
publish-*/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

The Azure Naming Tool was created to help administrators define and manage their naming conventions, while providing a simple interface for users to generate a compliant name. The tool was developed using a naming pattern based on [Microsoft's best practices](https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging). Once an administrator has defined the organizational components, users can use the tool to generate a name for the desired Azure resource.

## [Documentation](https://github.com/mspnp/AzureNamingTool/wiki)
## [CLICK HERE FOR DOCUMENTATION!](https://github.com/mspnp/AzureNamingTool/wiki)
91 changes: 91 additions & 0 deletions docs/v5.0.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
## Overview

The Azure Naming Tool documentation is hosted in the GitHub Wiki. Please use the link below to view documentation.

[GitHub Wiki - Documentation](https://github.com/mspnp/AzureNamingTool/wiki)

---

## Technical Documentation

### Release Documentation

| Document | Description | Audience |
|----------|-------------|----------|
| [Release Notes v5.0.0](./RELEASE_NOTES_v5.0.0.md) | Major features and breaking changes | All Users |
| [Migration Guide](./V5.0.0_MIGRATION_GUIDE.md) | Complete v5.0.0 upgrade guide with backup/restart procedures | Administrators, DevOps |

### Azure Tenant Name Validation (v5.0.0+)

Comprehensive documentation for the Azure tenant name validation feature:

#### Development Documentation (`development/`)

| Document | Description | Audience |
|----------|-------------|----------|
| [Implementation Plan](./development/AZURE_NAME_VALIDATION_PLAN.md) | 8-phase roadmap and technical architecture | Developers, Architects |
| [Administrator Guide](./development/AZURE_VALIDATION_ADMIN_GUIDE.md) | Setup, configuration, and maintenance procedures | Administrators, Operations |
| [API Guide](./development/AZURE_VALIDATION_API_GUIDE.md) | V2 API documentation with code examples | Developers, API Consumers |
| [Feature Complete Summary](./development/AZURE_VALIDATION_FEATURE_COMPLETE.md) | Complete feature implementation details | Developers |
| [Phase 5 UI Integration](./development/PHASE5_UI_INTEGRATION_SUMMARY.md) | UI integration implementation details | Developers |

#### Testing Documentation (`testing/`)

| Document | Description | Audience |
|----------|-------------|----------|
| [Testing Guide](./testing/AZURE_VALIDATION_TESTING_GUIDE.md) | Test suites and automated testing scripts | QA Teams, Developers |
| [Security Guide](./testing/AZURE_VALIDATION_SECURITY_GUIDE.md) | Authentication, RBAC, and security best practices | Security Teams, DevOps |
| [Migration Fix](./testing/AZURE_VALIDATION_MIGRATION_FIX.md) | Migration-related fixes and solutions | Developers, Support |
| [Backup & Restore](./testing/BACKUP_RESTORE.md) | Data backup and recovery procedures | Administrators, Operations |

### API Documentation (`wiki/`)

| Document | Description | Audience |
|----------|-------------|----------|
| [API V1 Wiki](./wiki/API_V1_WIKI.md) | Version 1 API documentation | Developers, API Consumers |
| [API V2 Wiki](./wiki/API_V2_WIKI.md) | Version 2 API documentation (recommended) | Developers, API Consumers |
| [Azure Validation Wiki](./wiki/AZURE_VALIDATION_WIKI.md) | Complete Azure validation feature documentation | All Users |
| [🐳 Azure Validation Docker Wiki](./AZURE_VALIDATION_DOCKER_WIKI.md) | **Docker deployment guide for Azure Validation** | Docker Users, DevOps |

### Other Development Documentation (`development/`)

| Document | Description | Audience |
|----------|-------------|----------|
| [Bulk API Operations](./development/API_BULK_OPERATION_IMPLEMENTATION_PLAN.md) | Bulk name generation implementation | Developers |
| [API Migration Plan](./development/API_MIGRATION_PLAN.md) | V1 to V2 API migration guide | Developers, Architects |
| [Dashboard Implementation](./development/DASHBOARD_IMPLEMENTATION_PLAN.md) | Dashboard features and implementation | Developers |
| [Modernization Plan](./development/MODERNIZATION_PLAN.md) | .NET 8 and Blazor modernization | Developers, Architects |
| [Design Implementation](./development/DESIGN_IMPLEMENTATION_PLAN.md) | UI/UX design patterns | Developers, Designers |
| [Migration Guidance](./development/MIGRATIONGUIDANCE_PLAN.md) | Tool migration procedures | Developers, Administrators |

---

## Document Organization

```
docs/v5.0.0/
├── README.md # This file
├── RELEASE_NOTES_v5.0.0.md # Release notes
├── V5.0.0_MIGRATION_GUIDE.md # Migration guide
├── development/ # Development & implementation docs
│ ├── API_BULK_OPERATION_IMPLEMENTATION_PLAN.md
│ ├── API_MIGRATION_PLAN.md
│ ├── AZURE_NAME_VALIDATION_PLAN.md
│ ├── AZURE_VALIDATION_ADMIN_GUIDE.md
│ ├── AZURE_VALIDATION_API_GUIDE.md
│ ├── AZURE_VALIDATION_FEATURE_COMPLETE.md
│ ├── DASHBOARD_IMPLEMENTATION_PLAN.md
│ ├── DESIGN_IMPLEMENTATION_PLAN.md
│ ├── MIGRATIONGUIDANCE_PLAN.md
│ ├── MODERNIZATION_PLAN.md
│ └── PHASE5_UI_INTEGRATION_SUMMARY.md
├── testing/ # Testing & operational docs
│ ├── AZURE_VALIDATION_MIGRATION_FIX.md
│ ├── AZURE_VALIDATION_SECURITY_GUIDE.md
│ ├── AZURE_VALIDATION_TESTING_GUIDE.md
│ └── BACKUP_RESTORE.md
└── wiki/ # Wiki-style documentation
├── API_V1_WIKI.md
├── API_V2_WIKI.md
└── AZURE_VALIDATION_WIKI.md
```
Loading
Loading