kind: pipeline type: docker name: code-quality trigger: event: - push - pull_request steps: - name: python-lint image: python:3.11-slim commands: - cd backend - pip install flake8 - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - name: frontend-lint image: node:20-alpine commands: - cd frontend - npm ci --silent - npm run lint || echo "ESLint warnings found" - name: frontend-security image: node:20-alpine commands: - cd frontend - npm ci --silent - npm audit --audit-level=moderate || echo "Security warnings found" --- kind: pipeline type: docker name: build-backend trigger: branch: - main - master - develop event: - push - tag depends_on: - code-quality steps: - name: build-backend-image image: plugins/docker settings: registry: registry.nevetime.ru repo: registry.nevetime.ru/mc-panel-backend tags: - latest - "${DRONE_COMMIT_SHA:0:8}" - "${DRONE_BRANCH}" auto_tag: true dockerfile: backend/Dockerfile context: backend username: from_secret: docker_username password: from_secret: docker_password build_args: - BUILD_DATE=${DRONE_BUILD_CREATED} - VCS_REF=${DRONE_COMMIT_SHA} - VERSION=${DRONE_TAG:-${DRONE_BRANCH}} when: event: - push - tag --- kind: pipeline type: docker name: build-frontend trigger: branch: - main - master - develop event: - push - tag depends_on: - code-quality steps: - name: build-frontend-image image: plugins/docker settings: registry: registry.nevetime.ru repo: registry.nevetime.ru/mc-panel-frontend tags: - latest - "${DRONE_COMMIT_SHA:0:8}" - "${DRONE_BRANCH}" auto_tag: true dockerfile: frontend/Dockerfile context: frontend target: production username: from_secret: docker_username password: from_secret: docker_password build_args: - BUILD_DATE=${DRONE_BUILD_CREATED} - VCS_REF=${DRONE_COMMIT_SHA} - VERSION=${DRONE_TAG:-${DRONE_BRANCH}} when: event: - push - tag --- kind: pipeline type: docker name: build-monolith trigger: branch: - main - master - develop event: - push - tag depends_on: - code-quality steps: - name: build-monolith-image image: plugins/docker settings: registry: registry.nevetime.ru repo: registry.nevetime.ru/mc-panel tags: - latest - "${DRONE_COMMIT_SHA:0:8}" - "${DRONE_BRANCH}" auto_tag: true dockerfile: Dockerfile context: . username: from_secret: docker_username password: from_secret: docker_password build_args: - BUILD_DATE=${DRONE_BUILD_CREATED} - VCS_REF=${DRONE_COMMIT_SHA} - VERSION=${DRONE_TAG:-${DRONE_BRANCH}} when: event: - push - tag