Woodpecker.yml rewrite v7
This commit is contained in:
parent
4b73d70c3f
commit
0637fefc79
@ -10,12 +10,12 @@ clone:
|
|||||||
depth: 50
|
depth: 50
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# ── Build & push images ──────────────────────────────
|
# ── 1. Build & push images ──────────────────────────────
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: docker:24.0-cli # use host Docker
|
image: docker:24.0-cli
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-sock # mount declared below
|
- name: docker-sock
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
@ -31,7 +31,7 @@ steps:
|
|||||||
event: [push, manual]
|
event: [push, manual]
|
||||||
branch: [master]
|
branch: [master]
|
||||||
|
|
||||||
# ── Deploy to staging ───────────────────────────────
|
# ── 2. Deploy to staging ────────────────────────────────
|
||||||
- name: deploy-staging
|
- name: deploy-staging
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
@ -39,15 +39,16 @@ steps:
|
|||||||
port: 22
|
port: 22
|
||||||
username: jcoakley
|
username: jcoakley
|
||||||
key:
|
key:
|
||||||
from_secret: STAGING_SSH_KEY
|
from_secret: STAGING_SSH_KEY # ← the only secrets we need
|
||||||
known_hosts:
|
known_hosts:
|
||||||
from_secret: STAGING_KNOWN_HOSTS
|
from_secret: STAGING_KNOWN_HOSTS
|
||||||
script:
|
script:
|
||||||
- cd /opt/aptiva-staging-app
|
- |
|
||||||
- ./refresh_secrets.sh
|
set -eu
|
||||||
- TAG=$(echo "$CI_COMMIT_SHA" | head -c 8)
|
TAG=$(echo "$CI_COMMIT_SHA" | head -c 8)
|
||||||
- IMG_TAG=$TAG docker compose pull
|
cd /opt/aptiva-staging-app
|
||||||
- IMG_TAG=$TAG docker compose up -d --remove-orphans
|
IMG_TAG=$TAG docker compose pull
|
||||||
|
IMG_TAG=$TAG docker compose up -d --force-recreate --remove-orphans
|
||||||
when:
|
when:
|
||||||
event: [push, manual]
|
event: [push, manual]
|
||||||
branch: [master]
|
branch: [master]
|
||||||
|
Loading…
Reference in New Issue
Block a user