ci: atualiza pipeline drone
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
44
.drone.yml
44
.drone.yml
@@ -1,37 +1,27 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: homolog
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: install dependencies
|
- name: deploy to homolog
|
||||||
image: python:3.11
|
|
||||||
commands:
|
|
||||||
- pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: run tests
|
|
||||||
image: python:3.11
|
|
||||||
commands:
|
|
||||||
- echo "Rodando testes..."
|
|
||||||
- pytest || echo "Sem testes implementados"
|
|
||||||
|
|
||||||
- name: build docker image
|
|
||||||
image: docker:dind
|
|
||||||
privileged: true
|
|
||||||
commands:
|
|
||||||
- docker build -t app_fatura:latest .
|
|
||||||
|
|
||||||
- name: deploy
|
|
||||||
image: appleboy/scp
|
image: appleboy/scp
|
||||||
settings:
|
settings:
|
||||||
host: 216.22.5.141
|
host: 216.22.5.141
|
||||||
username: root
|
username: root
|
||||||
password:
|
password: F6tC5tCh29XQRpzp
|
||||||
from_secret: scp_password
|
port: 22
|
||||||
|
source: .
|
||||||
target: /home/app_fatura_homolog
|
target: /home/app_fatura_homolog
|
||||||
source: ./
|
rm: true
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
|
- name: restart container
|
||||||
|
image: appleboy/ssh
|
||||||
|
settings:
|
||||||
|
host: 216.22.5.141
|
||||||
|
username: root
|
||||||
|
password: F6tC5tCh29XQRpzp
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- cd /home/app_fatura_homolog
|
||||||
|
- docker compose down
|
||||||
|
- docker compose up -d
|
||||||
|
|||||||
Reference in New Issue
Block a user