Compare commits

..

1 commit

Author SHA1 Message Date
db8e2fc928 Merge pull request 'develop' (#1) from develop into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #1
2025-03-20 22:02:29 +00:00

View file

@ -6,6 +6,8 @@ name: default
steps:
- name: debug
image: alpine
environment:
commands:
- 'echo "Repository: glenux/service-monica"'
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'
@ -23,12 +25,24 @@ steps:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
cache_from: "glenux/service-monica:${DRONE_BRANCH/\\//-}_latest"
cache_from: "glenux/service-monica:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-monica
tags:
- "${DRONE_BRANCH/\\//-}_${DRONE_COMMIT_SHA:0:8}"
- "${DRONE_BRANCH/\\//-}_latest"
- "latest"
tags: "${DRONE_COMMIT_SHA:0:8}"
purge: false
- name: publish:commit_branch
image: plugins/docker
# volumes:
# - name: cache
# path: /stupid
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
cache_from: "glenux/service-monica:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-monica
tags: "latest_${DRONE_BRANCH/\\//-}"
purge: false
when:
branch:
@ -36,6 +50,21 @@ steps:
- "develop"
- "feature/*"
- name: publish:latest
image: plugins/docker
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
cache_from: "glenux/service-monica:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-monica
tags: latest
purge: false
when:
branch:
- master
- name: deploy:dokku
image: alpine
when:
@ -56,15 +85,12 @@ steps:
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" | base64 -d > ~/.ssh/deploy_key
- chmod 600 ~/.ssh/deploy_key
- ssh-keygen -f ~/.ssh/deploy_key -y > ~/.ssh/deploy_key.pub
- "cat ~/.ssh/deploy_key.pub | cut -f3 -d' '"
- ssh -o StrictHostKeyChecking=no
-i ~/.ssh/deploy_key
"$SSH_USER@$SSH_HOST"
git:from-image prm
"glenux/service-monica:${DRONE_BRANCH/\\//-}_${DRONE_COMMIT_SHA:0:8}"
#
- echo "SUCCESS"
- |
ssh -o StrictHostKeyChecking=no \
-i ~/.ssh/deploy_key \
"$SSH_USER@$SSH_HOST" \
git:from-image prm \
"glenux/service-monica:${DRONE_COMMIT_SHA:0:8}"
# volumes:
# - name: cache