Fix script name
This commit is contained in:
parent
b9f876b04e
commit
67829fc608
29
automation/scrape-sync.sh
Normal file
29
automation/scrape-sync.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "🔄 Cloning repositories..."
|
||||||
|
REPOS=("dev-tools" "infra" "observability-stack")
|
||||||
|
rm -rf .tmp-repos
|
||||||
|
mkdir -p .tmp-repos
|
||||||
|
|
||||||
|
for REPO in "${REPOS[@]}"; do
|
||||||
|
git clone https://${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/${REPO}.git .tmp-repos/${REPO}
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "⚙️ Generating additional-scrape-configs.yaml..."
|
||||||
|
python3 automation/generate-scrape-config.py
|
||||||
|
|
||||||
|
echo "📦 Copying into observability-stack repo..."
|
||||||
|
cp observability-stack/manifests/prometheus-scrape-secret/additional-scrape-configs.yaml .tmp-repos/observability-stack/manifests/prometheus-scrape-secret/
|
||||||
|
|
||||||
|
cd .tmp-repos/observability-stack
|
||||||
|
git config user.name "auto-sync"
|
||||||
|
git config user.email "sync@dvirlabs.com"
|
||||||
|
|
||||||
|
if git diff --quiet; then
|
||||||
|
echo "✅ No changes to commit."
|
||||||
|
else
|
||||||
|
git add manifests/prometheus-scrape-secret/additional-scrape-configs.yaml
|
||||||
|
git commit -m "auto: update Prometheus scrape config"
|
||||||
|
git push origin master
|
||||||
|
fi
|
||||||
Loading…
x
Reference in New Issue
Block a user