refactor: move all remaining files to orig/ directory
Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
75
orig/scripts/ci-container.sh
Executable file
75
orig/scripts/ci-container.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
# Run CI pipeline inside a container (for isolation)
|
||||
# Usage: ./scripts/ci-container.sh [quick|dev|full]
|
||||
# Supports: Podman, Docker, and Podman-in-Podman
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
MODE="${1:-dev}"
|
||||
|
||||
case $MODE in
|
||||
quick)
|
||||
echo "🐳 Running Quick CI in Container..."
|
||||
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true -e HARNESS_SKIP_MATH_AUDIT=true -e HARNESS_SKIP_SECURITY=true"
|
||||
;;
|
||||
dev)
|
||||
echo "🐳 Running Development CI in Container..."
|
||||
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true"
|
||||
;;
|
||||
full)
|
||||
echo "🐳 Running Full CI in Container (Podman/Docker compatible)..."
|
||||
SKIP_FLAGS="-e HARNESS_SKIP_DOCKER=true"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [quick|dev|full]"
|
||||
echo " quick - Fast validation (30-60s)"
|
||||
echo " dev - Development pipeline (1-2min)"
|
||||
echo " full - Complete validation with container support (2-3min)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Load container runtime detection
|
||||
source "$(dirname "$0")/container-runtime.sh" init
|
||||
|
||||
if [[ -z "$CONTAINER_RUNTIME" ]]; then
|
||||
echo "❌ Error: No container runtime found (podman or docker required)"
|
||||
echo "Install with: sudo apt install podman"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using container runtime: $CONTAINER_RUNTIME"
|
||||
echo ""
|
||||
|
||||
# Create cache directories for performance
|
||||
mkdir -p .gocache .gomodcache
|
||||
|
||||
# Get DinD mount flags if inside container
|
||||
DIND_MOUNTS=""
|
||||
if [[ "$INSIDE_CONTAINER" == "true" ]]; then
|
||||
DIND_MOUNTS="$(source "$(dirname "$0")/container-runtime.sh" socket)"
|
||||
if [[ -n "$DIND_MOUNTS" ]]; then
|
||||
DIND_MOUNTS="-v $DIND_MOUNTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run pipeline in container
|
||||
$CONTAINER_RUNTIME run --rm \
|
||||
-v "$(pwd)":/workspace \
|
||||
-v "$(pwd)/.gocache":/root/.cache/go-build \
|
||||
-v "$(pwd)/.gomodcache":/go/pkg/mod \
|
||||
$DIND_MOUNTS \
|
||||
-w /workspace \
|
||||
$SKIP_FLAGS \
|
||||
golang:1.25-alpine \
|
||||
sh -c "
|
||||
echo 'Installing CI tools...' &&
|
||||
apk add --no-cache git make bash curl &&
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest &&
|
||||
echo 'Running pipeline...' &&
|
||||
./harness/local-ci-pipeline.sh
|
||||
"
|
||||
|
||||
echo ""
|
||||
echo "✅ Container CI completed successfully!"
|
||||
echo "📊 Check reports in: harness/reports/"
|
||||
Reference in New Issue
Block a user