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
|
||||
type: docker
|
||||
name: default
|
||||
name: homolog
|
||||
|
||||
steps:
|
||||
- name: install dependencies
|
||||
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
|
||||
- name: deploy to homolog
|
||||
image: appleboy/scp
|
||||
settings:
|
||||
host: 216.22.5.141
|
||||
username: root
|
||||
password:
|
||||
from_secret: scp_password
|
||||
password: F6tC5tCh29XQRpzp
|
||||
port: 22
|
||||
source: .
|
||||
target: /home/app_fatura_homolog
|
||||
source: ./
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
rm: true
|
||||
|
||||
- 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