26 lines
711 B
Bash
26 lines
711 B
Bash
#!/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
|
|
|
|
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 |