Compare commits

...

4 Commits

Author SHA1 Message Date
70fd1c01c9 ci: use localadmin user for deploy
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
2026-03-02 12:04:49 -06:00
9fe44ae560 Merge commit 'da9dbd7'
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
2026-03-02 11:41:40 -06:00
da9dbd7827 ci: add auto-deploy to Docker Swarm after CI passes 2026-03-02 11:41:10 -06:00
a1a37c77f6 fix(api): add missing /orchestrator/health and /orchestrator/events/recent endpoints
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
- Added GET /orchestrator/health for widget health checks
- Added GET /orchestrator/events/recent for recent agent events
- Widgets were calling endpoints that returned 404
2026-03-02 09:33:31 -06:00

View File

@@ -337,3 +337,35 @@ steps:
- security-trivy-api
- security-trivy-orchestrator
- security-trivy-web
# ─── Deploy to Docker Swarm (main only) ─────────────────────
deploy-swarm:
image: alpine:3
environment:
SSH_PRIVATE_KEY:
from_secret: ssh_private_key
SSH_KNOWN_HOSTS:
from_secret: ssh_known_hosts
commands:
- apk add --no-cache openssh-client
- |
set -e
# Setup SSH
mkdir -p ~/.ssh
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
# Deploy to swarm
echo "🚀 Deploying to Docker Swarm..."
ssh -o StrictHostKeyChecking=no localadmin@10.1.1.45 \
"cd /opt/mosaic-stack && \
docker login git.mosaicstack.dev -u \$(echo \$GITEA_USER) -p \$GITEA_TOKEN || true && \
docker stack deploy -c docker-compose.yml mosaic"
when:
- branch: [main]
event: [push, manual, tag]
depends_on:
- link-packages