Compare commits
4 Commits
codex/host
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7388962a7d | |||
| 7c54c57633 | |||
| fd84094aa4 | |||
| 7eb2ea5662 |
76
.drone.yml
76
.drone.yml
@@ -4,6 +4,7 @@ name: code-quality
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
steps:
|
||||
@@ -11,6 +12,7 @@ steps:
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- cd backend
|
||||
- pip install --no-cache-dir -r requirements.txt
|
||||
- python -m py_compile main.py auth.py daemons.py oidc_config.py
|
||||
|
||||
- name: frontend-build-check
|
||||
@@ -19,6 +21,14 @@ steps:
|
||||
- cd frontend
|
||||
- npm ci --silent
|
||||
- npm run build
|
||||
- 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
|
||||
@@ -34,17 +44,20 @@ trigger:
|
||||
- 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
|
||||
cache_from:
|
||||
- registry.nevetime.ru/mc-panel-backend:latest
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_BUILD_NUMBER}
|
||||
- "${DRONE_BUILD_NUMBER}"
|
||||
- "${DRONE_COMMIT_SHA:0:8}"
|
||||
- "${DRONE_BRANCH}"
|
||||
auto_tag: true
|
||||
dockerfile: backend/Dockerfile
|
||||
context: backend
|
||||
@@ -58,11 +71,11 @@ steps:
|
||||
settings:
|
||||
registry: registry.nevetime.ru
|
||||
repo: registry.nevetime.ru/mc-panel-frontend
|
||||
cache_from:
|
||||
- registry.nevetime.ru/mc-panel-frontend:latest
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_BUILD_NUMBER}
|
||||
- "${DRONE_BUILD_NUMBER}"
|
||||
- "${DRONE_COMMIT_SHA:0:8}"
|
||||
- "${DRONE_BRANCH}"
|
||||
auto_tag: true
|
||||
dockerfile: frontend/Dockerfile
|
||||
context: frontend
|
||||
@@ -70,3 +83,54 @@ steps:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user