This commit is contained in:
27
.drone.yml
27
.drone.yml
@@ -42,13 +42,13 @@ type: docker
|
||||
name: build-and-publish
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
branch:
|
||||
- main
|
||||
- master
|
||||
- develop
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
depends_on:
|
||||
- code-quality
|
||||
@@ -82,9 +82,8 @@ steps:
|
||||
- name: verify-image
|
||||
image: alpine:latest
|
||||
commands:
|
||||
- echo "Image built successfully: registry.nevetime.ru/mc-panel:${DRONE_COMMIT_SHA:0:8}"
|
||||
- echo "Security scanning can be done manually with:"
|
||||
- echo "trivy image 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 trivy"
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
@@ -98,10 +97,10 @@ type: docker
|
||||
name: deploy-staging
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
branch:
|
||||
- develop
|
||||
event:
|
||||
- push
|
||||
|
||||
depends_on:
|
||||
- build-and-publish
|
||||
@@ -122,11 +121,6 @@ steps:
|
||||
- echo "$STAGING_KEY" | base64 -d > /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}"
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
branch:
|
||||
- develop
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -134,10 +128,10 @@ type: docker
|
||||
name: deploy-production
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
ref:
|
||||
- refs/tags/v*
|
||||
event:
|
||||
- tag
|
||||
|
||||
depends_on:
|
||||
- build-and-publish
|
||||
@@ -158,6 +152,3 @@ steps:
|
||||
- echo "$PROD_KEY" | base64 -d > /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}"
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
Reference in New Issue
Block a user