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

This commit is contained in:
2026-01-18 20:52:38 +06:00
parent b4b5bba562
commit fea553df3d

View File

@@ -42,13 +42,13 @@ type: docker
name: build-and-publish name: build-and-publish
trigger: trigger:
event:
- push
- tag
branch: branch:
- main - main
- master - master
- develop - develop
event:
- push
- tag
depends_on: depends_on:
- code-quality - code-quality
@@ -82,9 +82,8 @@ steps:
- name: verify-image - name: verify-image
image: alpine:latest image: alpine:latest
commands: commands:
- echo "Image built successfully: registry.nevetime.ru/mc-panel:${DRONE_COMMIT_SHA:0:8}" - echo "Image built successfully registry.nevetime.ru/mc-panel:${DRONE_COMMIT_SHA:0:8}"
- echo "Security scanning can be done manually with:" - echo "Security scanning can be done manually with trivy"
- echo "trivy image registry.nevetime.ru/mc-panel:${DRONE_COMMIT_SHA:0:8}"
when: when:
event: event:
- push - push
@@ -98,10 +97,10 @@ type: docker
name: deploy-staging name: deploy-staging
trigger: trigger:
event:
- push
branch: branch:
- develop - develop
event:
- push
depends_on: depends_on:
- build-and-publish - build-and-publish
@@ -122,11 +121,6 @@ steps:
- echo "$STAGING_KEY" | base64 -d > /tmp/ssh_key - echo "$STAGING_KEY" | base64 -d > /tmp/ssh_key
- chmod 600 /tmp/ssh_key - chmod 600 /tmp/ssh_key
- ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key $STAGING_USER@$STAGING_HOST "docker pull registry.nevetime.ru/mc-panel:${DRONE_COMMIT_SHA:0:8}" - ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key $STAGING_USER@$STAGING_HOST "docker pull registry.nevetime.ru/mc-panel:${DRONE_COMMIT_SHA:0:8}"
when:
event:
- push
branch:
- develop
--- ---
kind: pipeline kind: pipeline
@@ -134,10 +128,10 @@ type: docker
name: deploy-production name: deploy-production
trigger: trigger:
event:
- tag
ref: ref:
- refs/tags/v* - refs/tags/v*
event:
- tag
depends_on: depends_on:
- build-and-publish - build-and-publish
@@ -158,6 +152,3 @@ steps:
- echo "$PROD_KEY" | base64 -d > /tmp/ssh_key - echo "$PROD_KEY" | base64 -d > /tmp/ssh_key
- chmod 600 /tmp/ssh_key - chmod 600 /tmp/ssh_key
- ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key $PROD_USER@$PROD_HOST "docker pull registry.nevetime.ru/mc-panel:${DRONE_TAG}" - ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key $PROD_USER@$PROD_HOST "docker pull registry.nevetime.ru/mc-panel:${DRONE_TAG}"
when:
event:
- tag