This commit is contained in:
36
.drone.yml
36
.drone.yml
@@ -8,28 +8,28 @@ trigger:
|
|||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: python-lint
|
- name: python-lint
|
||||||
image: python:3.11-slim
|
image: python:3.11-slim
|
||||||
commands:
|
commands:
|
||||||
- cd backend
|
- cd backend
|
||||||
- pip install flake8
|
- pip install flake8
|
||||||
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||||
|
|
||||||
- name: frontend-lint
|
- name: frontend-lint
|
||||||
image: node:20-alpine
|
image: node:20-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend
|
- cd frontend
|
||||||
- npm ci --silent
|
- npm ci --silent
|
||||||
- npm run lint || echo "ESLint warnings found"
|
- npm run lint || echo "ESLint warnings found"
|
||||||
|
|
||||||
- name: python-security
|
- name: python-security
|
||||||
image: python:3.11-slim
|
image: python:3.11-slim
|
||||||
commands:
|
commands:
|
||||||
- cd backend
|
- cd backend
|
||||||
- pip install safety
|
- pip install safety
|
||||||
- safety check --file=requirements.txt --exit-zero || echo "Security warnings found"
|
- safety check --file=requirements.txt --exit-zero || echo "Security warnings found"
|
||||||
|
|
||||||
- name: frontend-security
|
- name: frontend-security
|
||||||
image: node:20-alpine
|
image: node:20-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend
|
- cd frontend
|
||||||
@@ -51,10 +51,10 @@ trigger:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- code-quality
|
- code-quality
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-backend-image
|
- name: build-backend-image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.nevetime.ru
|
registry: registry.nevetime.ru
|
||||||
@@ -94,10 +94,10 @@ trigger:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- code-quality
|
- code-quality
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-frontend-image
|
- name: build-frontend-image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.nevetime.ru
|
registry: registry.nevetime.ru
|
||||||
@@ -138,10 +138,10 @@ trigger:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- code-quality
|
- code-quality
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-monolith-image
|
- name: build-monolith-image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.nevetime.ru
|
registry: registry.nevetime.ru
|
||||||
@@ -178,12 +178,12 @@ trigger:
|
|||||||
- push
|
- push
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- build-backend
|
||||||
- build-frontend
|
- build-frontend
|
||||||
- build-monolith
|
- build-monolith
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy-separate-services
|
- name: deploy-separate-services
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
environment:
|
environment:
|
||||||
STAGING_HOST:
|
STAGING_HOST:
|
||||||
@@ -211,12 +211,12 @@ trigger:
|
|||||||
- tag
|
- tag
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- build-backend
|
||||||
- build-frontend
|
- build-frontend
|
||||||
- build-monolith
|
- build-monolith
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy-separate-services
|
- name: deploy-separate-services
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
environment:
|
environment:
|
||||||
PROD_HOST:
|
PROD_HOST:
|
||||||
|
|||||||
Reference in New Issue
Block a user