🔧 FIX: Disable Telegram notifications until secrets configured
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
- Added fallback values for TELEGRAM_CHAT_ID - Temporarily disabled notifications to prevent 400 Bad Request errors - CI/CD pipeline will complete successfully without notification failures To enable notifications: 1. Add 'telegram_webhook_url' secret in Drone 2. Add 'telegram_chat_id' secret in Drone 3. Remove 'event: exclude' conditions from notify steps Main CI/CD functionality remains intact!
This commit is contained in:
12
.drone.yml
12
.drone.yml
@@ -149,7 +149,7 @@ steps:
|
||||
content_type: application/json
|
||||
template: |
|
||||
{
|
||||
"chat_id": "${TELEGRAM_CHAT_ID}",
|
||||
"chat_id": "${TELEGRAM_CHAT_ID:-@smartsoltech_ci}",
|
||||
"text": "✅ *SmartSolTech CI/CD*\n\nBuild completed successfully!\n\n📝 *Commit:* `${DRONE_COMMIT_SHA:0:8}`\n👤 *Author:* ${DRONE_COMMIT_AUTHOR}\n🌿 *Branch:* ${DRONE_BRANCH}\n⏱ *Time:* ${DRONE_BUILD_FINISHED}\n\n🔗 [Details](${DRONE_BUILD_LINK})",
|
||||
"parse_mode": "Markdown"
|
||||
}
|
||||
@@ -159,6 +159,10 @@ steps:
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
# Отключаем до настройки секретов
|
||||
event:
|
||||
exclude:
|
||||
- '*'
|
||||
depends_on:
|
||||
- security-scan
|
||||
|
||||
@@ -170,7 +174,7 @@ steps:
|
||||
content_type: application/json
|
||||
template: |
|
||||
{
|
||||
"chat_id": "${TELEGRAM_CHAT_ID}",
|
||||
"chat_id": "${TELEGRAM_CHAT_ID:-@smartsoltech_ci}",
|
||||
"text": "❌ *SmartSolTech CI/CD*\n\nBuild failed!\n\n📝 *Commit:* `${DRONE_COMMIT_SHA:0:8}`\n👤 *Author:* ${DRONE_COMMIT_AUTHOR}\n🌿 *Branch:* ${DRONE_BRANCH}\n⏱ *Time:* ${DRONE_BUILD_FINISHED}\n\n🔗 [Logs](${DRONE_BUILD_LINK})",
|
||||
"parse_mode": "Markdown"
|
||||
}
|
||||
@@ -180,6 +184,10 @@ steps:
|
||||
when:
|
||||
status:
|
||||
- failure
|
||||
# Отключаем до настройки секретов
|
||||
event:
|
||||
exclude:
|
||||
- '*'
|
||||
depends_on:
|
||||
- security-scan
|
||||
|
||||
|
||||
Reference in New Issue
Block a user