Another attempt to fix .drone.yml...
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-01-22 10:37:05 +07:00
parent 7eb2ea5662
commit fd84094aa4

View File

@@ -54,8 +54,8 @@ steps:
repo: registry.nevetime.ru/mc-panel-backend repo: registry.nevetime.ru/mc-panel-backend
tags: tags:
- latest - latest
- ${DRONE_COMMIT_SHA:0:8} - "${DRONE_COMMIT_SHA:0:8}"
- ${DRONE_BRANCH} - "${DRONE_BRANCH}"
auto_tag: true auto_tag: true
dockerfile: backend/Dockerfile dockerfile: backend/Dockerfile
context: backend context: backend
@@ -97,8 +97,8 @@ steps:
repo: registry.nevetime.ru/mc-panel-frontend repo: registry.nevetime.ru/mc-panel-frontend
tags: tags:
- latest - latest
- ${DRONE_COMMIT_SHA:0:8} - "${DRONE_COMMIT_SHA:0:8}"
- ${DRONE_BRANCH} - "${DRONE_BRANCH}"
auto_tag: true auto_tag: true
dockerfile: frontend/Dockerfile dockerfile: frontend/Dockerfile
context: frontend context: frontend
@@ -141,8 +141,8 @@ steps:
repo: registry.nevetime.ru/mc-panel repo: registry.nevetime.ru/mc-panel
tags: tags:
- latest - latest
- ${DRONE_COMMIT_SHA:0:8} - "${DRONE_COMMIT_SHA:0:8}"
- ${DRONE_BRANCH} - "${DRONE_BRANCH}"
auto_tag: true auto_tag: true
dockerfile: Dockerfile dockerfile: Dockerfile
context: . context: .
@@ -158,69 +158,3 @@ steps:
event: event:
- push - push
- tag - tag
---
kind: pipeline
type: docker
name: deploy-staging
trigger:
branch:
- develop
event:
- push
depends_on:
- build-backend
- build-frontend
- build-monolith
steps:
- name: deploy-separate-services
image: alpine:latest
environment:
STAGING_HOST:
from_secret: staging_host
STAGING_USER:
from_secret: staging_user
STAGING_KEY:
from_secret: staging_ssh_key
commands:
- apk add --no-cache openssh-client
- echo "Deploying separate services to staging..."
- echo "$STAGING_KEY" | base64 -d > /tmp/ssh_key
- chmod 600 /tmp/ssh_key
- ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key $STAGING_USER@$STAGING_HOST "docker pull registry.nevetime.ru/mc-panel-backend:${DRONE_COMMIT_SHA:0:8} && docker pull registry.nevetime.ru/mc-panel-frontend:${DRONE_COMMIT_SHA:0:8}"
---
kind: pipeline
type: docker
name: deploy-production
trigger:
ref:
- refs/tags/v*
event:
- tag
depends_on:
- build-backend
- build-frontend
- build-monolith
steps:
- name: deploy-separate-services
image: alpine:latest
environment:
PROD_HOST:
from_secret: production_host
PROD_USER:
from_secret: production_user
PROD_KEY:
from_secret: production_ssh_key
commands:
- apk add --no-cache openssh-client
- echo "Deploying separate services to production..."
- echo "$PROD_KEY" | base64 -d > /tmp/ssh_key
- chmod 600 /tmp/ssh_key
- ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key $PROD_USER@$PROD_HOST "docker pull registry.nevetime.ru/mc-panel-backend:${DRONE_TAG} && docker pull registry.nevetime.ru/mc-panel-frontend:${DRONE_TAG}"