From 892ffd637fcaac7c510beed635eebbdf02e0db90 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Tue, 3 Mar 2026 02:06:11 +0000 Subject: [PATCH] ci: fix deploy service names (#662) Co-authored-by: Jason Woltje Co-committed-by: Jason Woltje --- .woodpecker/ci.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml index 2e93ff3..5b4f9f5 100644 --- a/.woodpecker/ci.yml +++ b/.woodpecker/ci.yml @@ -340,6 +340,8 @@ steps: # ─── Deploy to Docker Swarm (main only) ───────────────────── + # ─── Deploy to Docker Swarm via Portainer (main only) ───────────────────── + deploy-swarm: image: alpine:3 environment: @@ -347,29 +349,29 @@ steps: from_secret: ssh_private_key SSH_KNOWN_HOSTS: from_secret: ssh_known_hosts - GITEA_USER: - from_secret: gitea_username - GITEA_TOKEN: - from_secret: gitea_token + PORTAINER_URL: + from_secret: portainer_url + PORTAINER_API_KEY: + from_secret: portainer_api_key commands: - - apk add --no-cache openssh-client + - apk add --no-cache curl openssh-client - | set -e - # Setup SSH + echo "🚀 Deploying to Docker Swarm..." + + # Setup SSH for fallback 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 - force update to pull new images - echo "🚀 Deploying to Docker Swarm..." + # Force service updates (images are pulled from public registry) ssh -o StrictHostKeyChecking=no localadmin@10.1.1.45 \ - "docker login git.mosaicstack.dev -u \$GITEA_USER -p \$GITEA_TOKEN && \ - docker service update --force mosaic_api && \ - docker service update --force mosaic_web && \ - docker service update --force mosaic_orchestrator && \ - docker service update --force mosaic_coordinator && \ + "docker service update --with-registry-auth --force mosaic-stack-api && \ + docker service update --with-registry-auth --force mosaic-stack-web && \ + docker service update --with-registry-auth --force mosaic-stack-orchestrator && \ + docker service update --with-registry-auth --force mosaic-stack-coordinator && \ echo '✅ All services updated'" when: - branch: [main]