This commit is contained in:
37
.drone.yml
37
.drone.yml
@@ -1,4 +1,3 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: code-quality
|
name: code-quality
|
||||||
@@ -9,7 +8,7 @@ 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
|
||||||
@@ -22,7 +21,7 @@ steps:
|
|||||||
- isort --check-only --diff . || echo "WARNING Import sorting issues found"
|
- isort --check-only --diff . || echo "WARNING Import sorting issues found"
|
||||||
- echo "SUCCESS Python checks completed"
|
- echo "SUCCESS Python checks completed"
|
||||||
|
|
||||||
- name: frontend-lint
|
- name: frontend-lint
|
||||||
image: node:20-alpine
|
image: node:20-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend
|
- cd frontend
|
||||||
@@ -33,7 +32,7 @@ steps:
|
|||||||
- npm run lint || echo "WARNING ESLint warnings found (non-blocking)"
|
- npm run lint || echo "WARNING ESLint warnings found (non-blocking)"
|
||||||
- echo "SUCCESS Frontend checks completed"
|
- echo "SUCCESS Frontend checks completed"
|
||||||
|
|
||||||
- name: python-tests
|
- name: python-tests
|
||||||
image: python:3.11-slim
|
image: python:3.11-slim
|
||||||
commands:
|
commands:
|
||||||
- cd backend
|
- cd backend
|
||||||
@@ -46,7 +45,7 @@ steps:
|
|||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: frontend-tests
|
- name: frontend-tests
|
||||||
image: node:20-alpine
|
image: node:20-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend
|
- cd frontend
|
||||||
@@ -59,7 +58,7 @@ steps:
|
|||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: python-security
|
- name: python-security
|
||||||
image: python:3.11-slim
|
image: python:3.11-slim
|
||||||
commands:
|
commands:
|
||||||
- cd backend
|
- cd backend
|
||||||
@@ -70,7 +69,7 @@ steps:
|
|||||||
- bandit -r . -f json -o bandit-report.json || echo "WARNING Security issues found"
|
- bandit -r . -f json -o bandit-report.json || echo "WARNING Security issues found"
|
||||||
- echo "SUCCESS Security checks completed"
|
- echo "SUCCESS Security checks completed"
|
||||||
|
|
||||||
- name: frontend-security
|
- name: frontend-security
|
||||||
image: node:20-alpine
|
image: node:20-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend
|
- cd frontend
|
||||||
@@ -94,10 +93,10 @@ trigger:
|
|||||||
- develop
|
- develop
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- code-quality
|
- code-quality
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.nevetime.ru
|
registry: registry.nevetime.ru
|
||||||
@@ -122,7 +121,7 @@ steps:
|
|||||||
- push
|
- push
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: test-image
|
- name: test-image
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
@@ -142,7 +141,7 @@ steps:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- build-and-push
|
- build-and-push
|
||||||
|
|
||||||
- name: scan-image
|
- name: scan-image
|
||||||
image: aquasec/trivy:latest
|
image: aquasec/trivy:latest
|
||||||
environment:
|
environment:
|
||||||
TRIVY_USERNAME:
|
TRIVY_USERNAME:
|
||||||
@@ -161,7 +160,7 @@ steps:
|
|||||||
- build-and-push
|
- build-and-push
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
@@ -177,10 +176,10 @@ trigger:
|
|||||||
- develop
|
- develop
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-and-publish
|
- build-and-publish
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy-to-staging
|
- name: deploy-to-staging
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
environment:
|
environment:
|
||||||
STAGING_HOST:
|
STAGING_HOST:
|
||||||
@@ -214,10 +213,10 @@ trigger:
|
|||||||
- refs/tags/v*
|
- refs/tags/v*
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-and-publish
|
- build-and-publish
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy-to-production
|
- name: deploy-to-production
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
environment:
|
environment:
|
||||||
PROD_HOST:
|
PROD_HOST:
|
||||||
@@ -252,11 +251,11 @@ trigger:
|
|||||||
- failure
|
- failure
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- code-quality
|
- code-quality
|
||||||
- build-and-publish
|
- build-and-publish
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: notify-telegram
|
- name: notify-telegram
|
||||||
image: appleboy/drone-telegram
|
image: appleboy/drone-telegram
|
||||||
settings:
|
settings:
|
||||||
token:
|
token:
|
||||||
|
|||||||
Reference in New Issue
Block a user