Apply Composer changes: comprehensive API updates, migrations, middleware, and infrastructure improvements
- Add comprehensive database migrations (001-024) for schema evolution - Enhance API schema with expanded type definitions and resolvers - Add new middleware: audit logging, rate limiting, MFA enforcement, security, tenant auth - Implement new services: AI optimization, billing, blockchain, compliance, marketplace - Add adapter layer for cloud integrations (Cloudflare, Kubernetes, Proxmox, storage) - Update Crossplane provider with enhanced VM management capabilities - Add comprehensive test suite for API endpoints and services - Update frontend components with improved GraphQL subscriptions and real-time updates - Enhance security configurations and headers (CSP, CORS, etc.) - Update documentation and configuration files - Add new CI/CD workflows and validation scripts - Implement design system improvements and UI enhancements
This commit is contained in:
70
scripts/build-crossplane-provider.sh
Executable file
70
scripts/build-crossplane-provider.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
# Build and push Crossplane provider
|
||||
# DEPLOY-020: Build and deploy Crossplane provider
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
PROVIDER_DIR="$PROJECT_ROOT/crossplane-provider-proxmox"
|
||||
|
||||
echo "=== Building Crossplane Provider ==="
|
||||
echo ""
|
||||
|
||||
# Check if Go is installed
|
||||
if ! command -v go &> /dev/null; then
|
||||
echo "✗ Go is not installed or not in PATH"
|
||||
echo " Please install Go 1.21 or later"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//')
|
||||
echo "✓ Found Go $GO_VERSION"
|
||||
echo ""
|
||||
|
||||
cd "$PROVIDER_DIR"
|
||||
|
||||
# Verify module path
|
||||
echo "Verifying Go module..."
|
||||
go mod verify
|
||||
go mod tidy
|
||||
|
||||
# Generate code
|
||||
echo ""
|
||||
echo "Generating code and CRDs..."
|
||||
make generate
|
||||
make manifests
|
||||
|
||||
# Run tests
|
||||
echo ""
|
||||
echo "Running tests..."
|
||||
make test || echo "⚠ Some tests failed, but continuing..."
|
||||
|
||||
# Build binary
|
||||
echo ""
|
||||
echo "Building provider binary..."
|
||||
make build
|
||||
|
||||
# Build Docker image (if Docker is available)
|
||||
if command -v docker &> /dev/null; then
|
||||
echo ""
|
||||
echo "Building Docker image..."
|
||||
IMG="${IMG:-ghcr.io/sankofa/crossplane-provider-proxmox:latest}"
|
||||
make docker-build IMG="$IMG"
|
||||
|
||||
echo ""
|
||||
echo "✓ Docker image built: $IMG"
|
||||
echo ""
|
||||
echo "To push the image:"
|
||||
echo " docker push $IMG"
|
||||
echo " or"
|
||||
echo " make docker-push IMG=$IMG"
|
||||
else
|
||||
echo ""
|
||||
echo "⚠ Docker is not available, skipping Docker build"
|
||||
echo " Binary built in: $PROVIDER_DIR/bin/provider"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=== Build Complete ==="
|
||||
|
||||
Reference in New Issue
Block a user