Skip to content

Commit 8fd13cf

Browse files
committed
refactor: remove legacy catalog.json, use only catalog/index.json
- Remove catalog.json generation from site_generator_v2.py - Keep only catalog/index.json (V3 lightweight format) - Update auto-release.yml to use catalog/index.json - Update full-build.yml to remove catalog.json references - Revert settings.py to use catalog/index.json (correct URL) - Fix #2: Keep if:always() on publish-metadata job No backward compatibility needed (only dev environment, no external users)
1 parent baa10ce commit 8fd13cf

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

.github/workflows/auto-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
id: detect
5050
env:
5151
INPUT_EXPORTERS: ${{ inputs.exporters }}
52-
CATALOG_URL: https://sckyzo.github.io/monitoring-hub/catalog.json
52+
CATALOG_URL: https://sckyzo.github.io/monitoring-hub/catalog/index.json
5353
run: |
5454
echo "::group::🔍 Detecting exporters to build"
5555

.github/workflows/full-build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,6 @@ jobs:
724724
725725
# Copy generated files
726726
cp index.html gh-pages-dist/
727-
cp catalog.json gh-pages-dist/ 2>/dev/null || true
728727
cp -r catalog gh-pages-dist/ 2>/dev/null || true
729728
730729
# Copy security stats if exists
@@ -735,7 +734,7 @@ jobs:
735734
cd gh-pages-dist
736735
git config user.name "Monitoring Hub Bot"
737736
git config user.email "bot@monitoring-hub.local"
738-
git add index.html catalog.json catalog/ security-stats.json 2>/dev/null || git add index.html catalog.json catalog/
737+
git add index.html catalog/ security-stats.json 2>/dev/null || git add index.html catalog/
739738
740739
if git diff --staged --quiet; then
741740
echo "No changes to commit"
@@ -758,7 +757,4 @@ jobs:
758757
if [ -f "catalog/index.json" ]; then
759758
count=$(jq '.exporters | length' catalog/index.json)
760759
echo "**Total exporters:** $count" >> $GITHUB_STEP_SUMMARY
761-
elif [ -f "catalog.json" ]; then
762-
count=$(jq '.exporters | length' catalog.json)
763-
echo "**Total exporters:** $count" >> $GITHUB_STEP_SUMMARY
764760
fi

core/config/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
DEFAULT_BASE_IMAGE = "registry.access.redhat.com/ubi9/ubi-minimal"
2828

2929
# Site & Catalog
30-
DEFAULT_CATALOG_URL = "https://sckyzo.github.io/monitoring-hub/catalog.json"
30+
DEFAULT_CATALOG_URL = "https://sckyzo.github.io/monitoring-hub/catalog/index.json"
3131
REPO_ROOT_URL = "https://sckyzo.github.io/monitoring-hub"
3232

3333
# Paths (relative to project root)

core/engine/site_generator_v2.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -315,20 +315,6 @@ def generate(output, repo_dir, catalog_dir, skip_catalog):
315315
copied += 1
316316

317317
click.echo(f"✓ Copied {copied} exporter metadata files")
318-
319-
# 3. Generate legacy catalog.json (for compatibility)
320-
legacy_output = os.path.join(output_dir, "catalog.json")
321-
with open(legacy_output, "w") as f:
322-
json.dump(
323-
{
324-
"exporters": exporters_data,
325-
"_note": "This format is deprecated. Use /catalog/index.json for new integrations.",
326-
},
327-
f,
328-
indent=2,
329-
)
330-
331-
click.echo(f"✓ Legacy catalog generated at {legacy_output}")
332318
else:
333319
click.echo("Catalog generation skipped (--skip-catalog)")
334320

0 commit comments

Comments
 (0)