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:
139
orig/harness/pipelines/staging.yaml
Normal file
139
orig/harness/pipelines/staging.yaml
Normal file
@@ -0,0 +1,139 @@
|
||||
pipeline:
|
||||
name: Staging Promotion
|
||||
identifier: staging_promotion
|
||||
projectIdentifier: mev_bot
|
||||
orgIdentifier: default
|
||||
tags: {}
|
||||
properties:
|
||||
ci:
|
||||
codebase:
|
||||
connectorRef: account.git
|
||||
repoName: fraktal/mev-beta
|
||||
build:
|
||||
type: branch
|
||||
spec:
|
||||
branch: <+input>
|
||||
stages:
|
||||
- stage:
|
||||
name: Build & Test
|
||||
identifier: build_test
|
||||
description: Run Drone-equivalent checks inside Harness.
|
||||
type: CI
|
||||
spec:
|
||||
cloneCodebase: true
|
||||
platform:
|
||||
os: Linux
|
||||
arch: Amd64
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
type: Run
|
||||
name: Lint
|
||||
identifier: lint
|
||||
spec:
|
||||
shell: Bash
|
||||
command: |
|
||||
go mod download
|
||||
golangci-lint run --timeout=10m
|
||||
- step:
|
||||
type: Run
|
||||
name: UnitTests
|
||||
identifier: unit_tests
|
||||
spec:
|
||||
shell: Bash
|
||||
command: |
|
||||
GOCACHE=$(pwd)/.gocache go test -race -coverprofile=coverage.out ./...
|
||||
test -s coverage.out
|
||||
- step:
|
||||
type: Run
|
||||
name: MathAudit
|
||||
identifier: math_audit
|
||||
spec:
|
||||
shell: Bash
|
||||
command: |
|
||||
GOCACHE=$(pwd)/.gocache go run ./tools/math-audit --vectors default --report reports/math/latest
|
||||
ls -l reports/math/latest
|
||||
- step:
|
||||
type: Run
|
||||
name: ProfitSimulation
|
||||
identifier: profit_simulation
|
||||
spec:
|
||||
shell: Bash
|
||||
command: |
|
||||
./scripts/run_profit_simulation.sh
|
||||
cat reports/simulation/latest/summary.md
|
||||
caching:
|
||||
enabled: true
|
||||
- stage:
|
||||
name: Package
|
||||
identifier: package
|
||||
type: CI
|
||||
spec:
|
||||
cloneCodebase: false
|
||||
platform:
|
||||
os: Linux
|
||||
arch: Amd64
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
type: Run
|
||||
name: DockerBuild
|
||||
identifier: docker_build
|
||||
spec:
|
||||
shell: Bash
|
||||
command: |
|
||||
docker build -t mev-bot:${HARNESS_BUILD_NUMBER} .
|
||||
docker save mev-bot:${HARNESS_BUILD_NUMBER} -o mev-bot.tar
|
||||
- step:
|
||||
type: Run
|
||||
name: PublishArtifact
|
||||
identifier: publish_artifact
|
||||
spec:
|
||||
shell: Bash
|
||||
command: |
|
||||
echo "Uploading mev-bot.tar to artifact store"
|
||||
when:
|
||||
pipelineStatus: Success
|
||||
- stage:
|
||||
name: Deploy to Staging
|
||||
identifier: deploy_staging
|
||||
type: CD
|
||||
spec:
|
||||
deploymentType: Kubernetes
|
||||
service:
|
||||
serviceRef: staging
|
||||
environment:
|
||||
environmentRef: staging
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
type: ShellScript
|
||||
name: HelmUpgrade
|
||||
identifier: helm_upgrade
|
||||
spec:
|
||||
shell: Bash
|
||||
source: Inline
|
||||
script: |
|
||||
helm upgrade --install mev-bot charts/mev-bot \
|
||||
--set image.tag=${HARNESS_BUILD_NUMBER} \
|
||||
--namespace mev-bot-staging
|
||||
- step:
|
||||
type: ShellScript
|
||||
name: PostDeployChecks
|
||||
identifier: post_deploy_checks
|
||||
spec:
|
||||
shell: Bash
|
||||
source: Inline
|
||||
script: |
|
||||
kubectl rollout status deploy/mev-bot -n mev-bot-staging --timeout=120s
|
||||
kubectl logs deploy/mev-bot -n mev-bot-staging | tail -n 100
|
||||
rollbackSteps:
|
||||
- step:
|
||||
type: ShellScript
|
||||
name: Rollback
|
||||
identifier: rollback
|
||||
spec:
|
||||
shell: Bash
|
||||
source: Inline
|
||||
script: |
|
||||
helm rollback mev-bot 1 || true
|
||||
Reference in New Issue
Block a user