Another attempt to fix .drone.yml...
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
78
.drone.yml
78
.drone.yml
@@ -54,8 +54,8 @@ steps:
|
||||
repo: registry.nevetime.ru/mc-panel-backend
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:8}
|
||||
- ${DRONE_BRANCH}
|
||||
- "${DRONE_COMMIT_SHA:0:8}"
|
||||
- "${DRONE_BRANCH}"
|
||||
auto_tag: true
|
||||
dockerfile: backend/Dockerfile
|
||||
context: backend
|
||||
@@ -97,8 +97,8 @@ steps:
|
||||
repo: registry.nevetime.ru/mc-panel-frontend
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:8}
|
||||
- ${DRONE_BRANCH}
|
||||
- "${DRONE_COMMIT_SHA:0:8}"
|
||||
- "${DRONE_BRANCH}"
|
||||
auto_tag: true
|
||||
dockerfile: frontend/Dockerfile
|
||||
context: frontend
|
||||
@@ -141,8 +141,8 @@ steps:
|
||||
repo: registry.nevetime.ru/mc-panel
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:8}
|
||||
- ${DRONE_BRANCH}
|
||||
- "${DRONE_COMMIT_SHA:0:8}"
|
||||
- "${DRONE_BRANCH}"
|
||||
auto_tag: true
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
@@ -158,69 +158,3 @@ steps:
|
||||
event:
|
||||
- push
|
||||
- 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}"
|
||||
Reference in New Issue
Block a user