🤖 feat: simplify CI/CD structure and add Docker workflow
Some checks failed
Some checks failed
- Rename ci-cd.yaml to go-ci-cd.yaml for clarity - Add dockerimage.yaml workflow for Docker builds - Create Dockerfile for production deployment - Add comprehensive CI/CD documentation - Create contributor-quickstart.sh for easy validation - Update all scripts to handle both workflow files - Fix event triggers to run on all relevant pushes - Remove redundant YAML syntax validation - Improve workflow validation for Arcodange conventions BREAKING CHANGE: ci-cd.yaml renamed to go-ci-cd.yaml See scripts/cicd/README.md for complete documentation. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
78
scripts/cicd/contributor-quickstart.sh
Executable file
78
scripts/cicd/contributor-quickstart.sh
Executable file
@@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
# Simple CI/CD validation for new contributors
|
||||
# Works without Docker - just validates the essentials
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 DanceLessonsCoach Contributor Quick Start"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
echo "This script helps you validate your changes before submitting a PR."
|
||||
echo "It doesn't require Docker or complex setup."
|
||||
echo ""
|
||||
|
||||
# 1. Check Go is installed
|
||||
echo "1. Checking Go installation..."
|
||||
if ! command -v go >/dev/null 2>&1; then
|
||||
echo "❌ Go is not installed. Please install Go 1.26.1+"
|
||||
echo " Download: https://go.dev/dl/"
|
||||
exit 1
|
||||
fi
|
||||
go_version=$(go version | grep -o 'go[0-9.]*')
|
||||
echo "✅ Go $go_version found"
|
||||
|
||||
# 2. Run Go tests
|
||||
echo ""
|
||||
echo "2. Running Go tests..."
|
||||
if go test ./...; then
|
||||
echo "✅ All Go tests passed"
|
||||
else
|
||||
echo "❌ Some tests failed. Please fix and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 3. Check formatting
|
||||
echo ""
|
||||
echo "3. Checking code formatting..."
|
||||
if [ -n "$(go fmt ./...)" ]; then
|
||||
echo "❌ Code formatting issues found"
|
||||
echo " Run: go fmt ./..."
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ Code is properly formatted"
|
||||
|
||||
# 4. Run Go vet
|
||||
echo ""
|
||||
echo "4. Running Go vet..."
|
||||
if go vet ./...; then
|
||||
echo "✅ Go vet passed"
|
||||
else
|
||||
echo "❌ Go vet found issues"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 5. Validate workflows (no Docker required)
|
||||
echo ""
|
||||
echo "5. Validating CI/CD workflows..."
|
||||
if [ -f "scripts/cicd/validate-workflow.sh" ]; then
|
||||
if ./scripts/cicd/validate-workflow.sh; then
|
||||
echo "✅ Workflow validation passed"
|
||||
else
|
||||
echo "⚠️ Workflow validation issues (not critical)"
|
||||
fi
|
||||
else
|
||||
echo "ℹ️ Workflow validation script not found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "🎉 All checks passed!"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
echo "Your changes are ready to submit! 🚀"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo " 1. Commit your changes: git commit -m 'feat: your feature'"
|
||||
echo " 2. Push to your branch: git push origin your-branch"
|
||||
echo " 3. Create a Pull Request"
|
||||
echo ""
|
||||
echo "The CI/CD pipeline will run automatically on your PR!"
|
||||
Reference in New Issue
Block a user