mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-19 02:40:07 -06:00
Complete reorganization of project documentation to improve discoverability, navigation, and maintainability. All documentation has been restructured into a clear, role-based hierarchy. ## Major Changes ### New Directory Structure - Created `docs/api/` for API documentation - Created `docs/admin/` with subdirectories: - `admin/configuration/` - Configuration guides - `admin/deployment/` - Deployment guides - `admin/security/` - Security documentation - `admin/monitoring/` - Monitoring and analytics - Created `docs/development/` for developer documentation - Created `docs/guides/` for user-facing guides - Created `docs/reports/` for analysis reports and summaries - Created `docs/changelog/` for detailed changelog entries (ready for future use) ### File Organization #### Moved from Root Directory (40+ files) - Implementation notes → `docs/implementation-notes/` - Test reports → `docs/testing/` - Analysis reports → `docs/reports/` - User guides → `docs/guides/` #### Reorganized within docs/ - API documentation → `docs/api/` - Administrator documentation → `docs/admin/` (with subdirectories) - Developer documentation → `docs/development/` - Security documentation → `docs/admin/security/` - Telemetry documentation → `docs/admin/monitoring/` ### Documentation Updates #### docs/README.md - Complete rewrite with improved navigation - Added visual documentation map - Organized by role (Users, Administrators, Developers) - Better categorization and quick links - Updated all internal links to new structure #### README.md (root) - Updated all documentation links to reflect new structure - Fixed 8 broken links #### app/templates/main/help.html - Enhanced "Where can I get additional help?" section - Added links to new documentation structure - Added documentation index link - Added admin documentation link for administrators - Improved footer with organized documentation links - Added "Complete Documentation" section with role-based links ### New Index Files - Created README.md files for all new directories: - `docs/api/README.md` - `docs/guides/README.md` - `docs/reports/README.md` - `docs/development/README.md` - `docs/admin/README.md` ### Cleanup - Removed empty `docs/security/` directory (moved to `admin/security/`) - Removed empty `docs/telemetry/` directory (moved to `admin/monitoring/`) - Root directory now only contains: README.md, CHANGELOG.md, LICENSE ## Results **Before:** - 45+ markdown files cluttering root directory - Documentation scattered across root and docs/ - Difficult to find relevant documentation - No clear organization structure **After:** - 3 files in root directory (README, CHANGELOG, LICENSE) - Clear directory structure organized by purpose and audience - Easy navigation with role-based organization - All documentation properly categorized - Improved discoverability ## Benefits 1. Better Organization - Documentation grouped by purpose and audience 2. Easier Navigation - Role-based sections (Users, Admins, Developers) 3. Improved Discoverability - Clear structure with README files in each directory 4. Cleaner Root - Only essential files at project root 5. Maintainability - Easier to add and organize new documentation ## Files Changed - 40+ files moved from root to appropriate docs/ subdirectories - 15+ files reorganized within docs/ - 3 major documentation files updated (docs/README.md, README.md, help.html) - 5 new README index files created - 2 empty directories removed All internal links have been updated to reflect the new structure.
8.7 KiB
8.7 KiB
TimeTracker Release Process Guide
This document outlines the comprehensive release process for TimeTracker, including automated workflows, manual steps, and best practices.
🚀 Quick Release Guide
Automated Release (Recommended)
# 1. Create a complete release with changelog and GitHub release
./scripts/version-manager.sh release --version v1.2.3 --changelog --github-release
# 2. For pre-releases
./scripts/version-manager.sh release --version v1.2.3-rc.1 --pre-release --changelog --github-release
Manual Release Steps
- Prepare Release
- Create Tag
- Generate Changelog
- Create GitHub Release
- Verify Deployment
📋 Detailed Release Process
1. Pre-Release Checklist
Before starting any release, ensure:
- All tests pass in CI/CD
- Database migrations tested and documented
- Docker images build successfully
- Documentation updated with new features
- Breaking changes documented (if any)
- Security vulnerabilities addressed
- Performance regressions checked
2. Release Preparation
Check Current Status
# Check current version and status
./scripts/version-manager.sh status
# Check for uncommitted changes
git status
# Ensure you're on main branch
git checkout main
git pull origin main
Version Selection
Follow Semantic Versioning:
- Major (v2.0.0): Breaking changes, major new features
- Minor (v1.1.0): New features, backward compatible
- Patch (v1.0.1): Bug fixes, backward compatible
- Pre-release (v1.0.0-rc.1): Release candidates, beta versions
Suggested Version
# Get version suggestion
./scripts/version-manager.sh suggest
3. Release Types
3.1 Standard Release
# Create standard release
./scripts/version-manager.sh release \
--version v1.2.3 \
--message "Release 1.2.3 with new features and bug fixes" \
--changelog \
--github-release
What this does:
- Creates and pushes git tag
- Generates changelog from commits
- Creates GitHub release with changelog
- Triggers Docker image build via GitHub Actions
3.2 Pre-Release
# Create pre-release (RC, beta, alpha)
./scripts/version-manager.sh release \
--version v1.2.3-rc.1 \
--message "Release candidate for 1.2.3" \
--pre-release \
--changelog \
--github-release
3.3 Hotfix Release
# Create hotfix from main branch
git checkout main
git pull origin main
# Apply hotfix
git cherry-pick <hotfix-commit>
# Create hotfix release
./scripts/version-manager.sh release \
--version v1.2.4 \
--message "Hotfix: Critical security update" \
--changelog \
--github-release
4. Manual Release Steps
If you prefer manual control over the release process:
Step 1: Create Tag
# Create annotated tag
git tag -a v1.2.3 -m "Release 1.2.3"
git push origin v1.2.3
Step 2: Generate Changelog
# Generate changelog
python scripts/generate-changelog.py v1.2.3 --output CHANGELOG.md
# Review and edit changelog if needed
nano CHANGELOG.md
Step 3: Create GitHub Release
# Using GitHub CLI
gh release create v1.2.3 \
--title "TimeTracker v1.2.3" \
--notes-file CHANGELOG.md
# Or via GitHub web interface
# Go to: https://github.com/your-repo/releases/new
5. Post-Release Verification
5.1 Verify GitHub Actions
- Check that Docker build workflow completed successfully
- Verify Docker images are published to GHCR
- Confirm all CI/CD checks passed
5.2 Test Docker Images
# Test the released image
docker run -d --name test-release -p 8080:8080 \
ghcr.io/drytrix/timetracker:v1.2.3
# Verify health
curl -f http://localhost:8080/_health
# Clean up
docker stop test-release && docker rm test-release
5.3 Update Documentation
- Update README.md version references
- Update deployment documentation
- Update Docker Compose examples
- Notify users of new release
6. Release Workflow Automation
The release process triggers several automated workflows:
6.1 Release Workflow (release.yml)
Triggered by: GitHub release creation or manual dispatch
Steps:
- Validate Release - Ensures version format is correct
- Run Tests - Full test suite with database migrations
- Build & Push Docker - Multi-architecture Docker images
- Generate Changelog - Automated changelog generation
- Update Documentation - Version references in docs
- Notify Deployment - Summary and deployment instructions
6.2 CI Workflow (ci.yml)
Triggered by: Push to main/develop, pull requests
Steps:
- Lint & Format - Code quality checks
- Test Database Migrations - PostgreSQL & SQLite testing
- Test Docker Build - Container build and startup verification
- Security Scan - Dependency and code security scanning
- Version Management Validation - Version manager script testing
6.3 Migration Check Workflow (migration-check.yml)
Triggered by: Changes to models or migrations
Steps:
- Validate Migrations - Schema consistency and rollback safety
- Test with Sample Data - Data integrity verification
- Generate Migration Report - Detailed migration analysis
7. Emergency Procedures
7.1 Rollback Release
# Delete tag locally and remotely
git tag -d v1.2.3
git push origin --delete v1.2.3
# Delete GitHub release
gh release delete v1.2.3
# Revert commits if needed
git revert <commit-hash>
7.2 Fix Broken Release
# Create hotfix
git checkout v1.2.3
git cherry-pick <fix-commit>
# Create new patch release
./scripts/version-manager.sh release \
--version v1.2.4 \
--message "Hotfix for v1.2.3 issues" \
--changelog \
--github-release
8. Release Schedule
Recommended Schedule
- Major releases: Every 6-12 months
- Minor releases: Every 1-2 months
- Patch releases: As needed for critical fixes
- Pre-releases: 1-2 weeks before major/minor releases
Release Windows
- Regular releases: Tuesday-Thursday (better for issue resolution)
- Hotfixes: Any day (emergency only)
- Pre-releases: Friday (allows weekend testing)
9. Communication
Internal Team
- Notify team before release
- Share release notes
- Coordinate deployment timing
- Plan post-release monitoring
External Users
- Update release notes on GitHub
- Update documentation website
- Notify via social media/newsletters
- Update Docker Hub descriptions
10. Quality Gates
Every release must pass:
- All automated tests (unit, integration, E2E)
- Database migration tests (up and down)
- Docker build verification (multi-architecture)
- Security scans (dependencies and code)
- Performance benchmarks (no significant regression)
- Documentation review (accuracy and completeness)
11. Troubleshooting
Common Issues
Issue: Docker build fails
# Check Docker build locally
docker build -t test-build .
# Check workflow logs in GitHub Actions
Issue: Migration validation fails
# Test migrations locally
flask db upgrade
flask db downgrade
flask db upgrade
Issue: Version tag already exists
# Check existing tags
git tag -l
# Delete if needed
git tag -d v1.2.3
git push origin --delete v1.2.3
12. Tools and Dependencies
Required Tools
- Git - Version control
- GitHub CLI (
gh) - GitHub release management - Docker - Container testing
- Python 3.11+ - Script execution
- Flask - Database migration testing
Installation
# Install GitHub CLI
# macOS: brew install gh
# Ubuntu: sudo apt install gh
# Windows: winget install GitHub.CLI
# Authenticate
gh auth login
# Install Python dependencies
pip install -r requirements.txt
13. Metrics and Monitoring
Track release metrics:
- Release frequency - How often releases are made
- Lead time - Time from commit to release
- Failure rate - Percentage of failed releases
- Recovery time - Time to fix broken releases
- User adoption - Docker pull statistics
14. Continuous Improvement
Regular review of:
- Release process efficiency
- Automation opportunities
- Quality gate effectiveness
- User feedback incorporation
- Tool and workflow updates
🔗 Related Documentation
🆘 Support
For release process issues:
- Check this documentation
- Review GitHub Actions logs
- Test locally with provided commands
- Create issue with detailed error information