Initial clean commit of the project
This commit is contained in:
45
.drone.yml
Normal file
45
.drone.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build-and-deploy-staging
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- staging
|
||||
event:
|
||||
- push
|
||||
|
||||
steps:
|
||||
# Шаг 'docker-login' остается без изменений
|
||||
- name: docker-login
|
||||
image: docker:latest
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: DOCKER_USERNAME
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: DOCKER_PASSWORD
|
||||
commands:
|
||||
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
||||
|
||||
# Шаг 'testing' остается без изменений
|
||||
- name: testing
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install poetry
|
||||
- poetry install
|
||||
- poetry run pytest -v
|
||||
|
||||
# ИЗМЕНЕНИЕ ЗДЕСЯ
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host: 45.86.181.80
|
||||
# ЯВНО УКАЗЫВАЕМ ПРАВИЛЬНЫЙ ПОРТ ДЛЯ SSH
|
||||
port: 2223
|
||||
username: orlov
|
||||
key:
|
||||
from_secret: DEPLOY_STAG_SSH_KEY
|
||||
script:
|
||||
- cd /home/orlov/apps/marquiz-metrics-staging
|
||||
- git pull origin staging
|
||||
- docker compose up -d --build
|
||||
- echo "Deployment finished successfully!"
|
||||
Reference in New Issue
Block a user