chore: pre-migration snapshot
Layer0, MCP servers, Terraform consolidation
This commit is contained in:
84
.github/workflows/registry_validation.yml
vendored
Normal file
84
.github/workflows/registry_validation.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
name: Cloudflare Registry Validation
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'cloudflare/**'
|
||||
- '.github/workflows/registry_validation.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'cloudflare/**'
|
||||
- '.github/workflows/registry_validation.yml'
|
||||
schedule:
|
||||
# Daily validation to catch drift
|
||||
- cron: '0 6 * * *'
|
||||
|
||||
jobs:
|
||||
validate-registry:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Add any MCP server dependencies here if needed
|
||||
|
||||
- name: Set PYTHONPATH
|
||||
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
|
||||
|
||||
- name: Run Tool Name Parity Check
|
||||
run: |
|
||||
cd cloudflare
|
||||
python3 ci_check_tool_names.py
|
||||
|
||||
- name: Run Entrypoint Sanity Check
|
||||
run: |
|
||||
cd cloudflare
|
||||
python3 ci_check_entrypoints.py
|
||||
|
||||
- name: Generate Fresh Registry
|
||||
run: |
|
||||
cd cloudflare
|
||||
python3 generate_capability_registry_v2.py
|
||||
|
||||
- name: Validate Registry Format
|
||||
run: |
|
||||
cd cloudflare
|
||||
python3 -c "
|
||||
import json
|
||||
with open('capability_registry_v2.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
# Basic validation
|
||||
assert 'mcp_servers' in registry
|
||||
assert 'terraform_resources' in registry
|
||||
assert 'gitops_tools' in registry
|
||||
print('✅ Registry format is valid')
|
||||
"
|
||||
|
||||
- name: Check for Registry Changes
|
||||
id: registry_changes
|
||||
run: |
|
||||
cd cloudflare
|
||||
# Check if registry changed during validation
|
||||
if git diff --name-only capability_registry_v2.json; then
|
||||
echo "changes_detected=true" >> $GITHUB_OUTPUT
|
||||
echo "⚠️ Registry changed during validation - manual review recommended"
|
||||
else
|
||||
echo "changes_detected=false" >> $GITHUB_OUTPUT
|
||||
echo "✅ Registry is stable"
|
||||
fi
|
||||
|
||||
- name: Upload Registry Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: capability-registry
|
||||
path: cloudflare/capability_registry_v2.json
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user