Fixed drone.yml
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-15 22:21:14 +06:00
parent c840024e4a
commit e6264efac6

View File

@@ -3,14 +3,12 @@ kind: pipeline
type: docker
name: code-quality
# Триггеры для пайплайна проверки качества
trigger:
event:
- push
- pull_request
steps:
# Проверка качества Python кода (только критические ошибки)
- name: python-lint
image: python:3.11-slim
commands:
@@ -20,7 +18,6 @@ steps:
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- echo "✅ Critical checks passed"
# Проверка качества JavaScript/React кода (опционально)
- name: frontend-lint
image: node:18-alpine
commands:
@@ -30,7 +27,6 @@ steps:
- npm run lint || echo "⚠️ ESLint warnings found (non-blocking)"
- echo "✅ Frontend checks completed"
# Проверка безопасности зависимостей Python (опционально)
- name: python-security
image: python:3.11-slim
commands:
@@ -40,7 +36,6 @@ steps:
- safety check --file=requirements.txt --exit-zero || echo "⚠️ Security warnings found (non-blocking)"
- echo "✅ Security checks completed"
# Проверка безопасности зависимостей Node.js
- name: frontend-security
image: node:18-alpine
commands:
@@ -54,7 +49,6 @@ kind: pipeline
type: docker
name: build-and-publish
# Триггеры для пайплайна сборки
trigger:
event:
- push
@@ -64,12 +58,10 @@ trigger:
- master
- develop
# Зависимость от пайплайна проверки качества
depends_on:
- code-quality
steps:
# Сборка и публикация Docker образа
- name: build-and-push
image: plugins/docker
settings:
@@ -77,7 +69,7 @@ steps:
repo: registry.nevetime.ru/mc-panel
tags:
- latest
- "${DRONE_COMMIT_SHA:0:8}"
- ${DRONE_COMMIT_SHA:0:8}
auto_tag: true
dockerfile: Dockerfile
context: .
@@ -86,21 +78,20 @@ steps:
password:
from_secret: docker_password
build_args:
- "BUILD_DATE=${DRONE_BUILD_CREATED}"
- "VCS_REF=${DRONE_COMMIT_SHA}"
- "VERSION=1.1.0"
- BUILD_DATE=${DRONE_BUILD_CREATED}
- VCS_REF=${DRONE_COMMIT_SHA}
- VERSION=1.1.0
when:
event:
- push
- tag
# Сканирование образа на уязвимости (опционально, требует авторизации)
- name: scan-image
image: aquasec/trivy
commands:
- echo "⚠️ Image scanning skipped (requires registry authentication)"
- echo "To enable scanning, configure registry credentials for Trivy"
- echo "Image published: registry.nevetime.ru/mc-panel:${DRONE_COMMIT_SHA:0:8}"
- echo "Image published registry.nevetime.ru/mc-panel"
when:
event:
- push