Добавил уведомление о сборке
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
168d48cca5
commit
35fa39720c
@ -137,6 +137,7 @@ steps:
|
||||
- git checkout $DRONE_COMMIT
|
||||
- cd documentation/ru
|
||||
- mike deploy --prefix gitlab-notification/ru --branch docs-deploy --push --update-aliases develop
|
||||
- sh ci-notify.sh
|
||||
|
||||
image_pull_secrets:
|
||||
- DOCKER_AUTH
|
||||
@ -193,6 +194,6 @@ volumes:
|
||||
path: /drone/volume/mkdocs_cache/gitlab_notification
|
||||
---
|
||||
kind: signature
|
||||
hmac: 23d498c2e305f04c5aef8df6c48fa62ab96def09d238c703497a3d2955526b67
|
||||
hmac: 0ec61b15fedee05ddb1c602fae1893c68ab292e2df8424ef36f8e9a94faf707e
|
||||
|
||||
...
|
||||
|
14
ci-notify.sh
14
ci-notify.sh
@ -1,7 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
TIME="10"
|
||||
URL="https://api.telegram.org/bot$DEPLOY_TELEGRAM_BOT_TOKEN/sendMessage"
|
||||
TEXT="Deploy status: $1%0A-- -- -- -- --%0ABranch:+$CI_COMMIT_REF_SLUG%0AProject:+$CI_PROJECT_TITLE"
|
||||
if [ "$DRONE_BUILD_STATUS" = "success" ]; then
|
||||
DEPLOY_STATUS="✅"
|
||||
else
|
||||
DEPLOY_STATUS="❌"
|
||||
fi
|
||||
|
||||
curl -s --max-time $TIME --proxy $PROXY_SETTING -d "chat_id=$TELEGRAM_CHAT_ID&disable_web_page_preview=1&text=$TEXT" $URL >/dev/null
|
||||
TIME="10"
|
||||
URL="https://api.telegram.org/bot$NOTIFY_TELEGRAM_BOT_TOKEN/sendMessage"
|
||||
TEXT="Deploy status: $DEPLOY_STATUS%0A-- -- -- -- --%0ABranch:+$DRONE_TARGET_BRANCH%0ATag:+$DRONE_TAG%0AProject:+$DRONE_REPO_NAME"
|
||||
|
||||
curl -s --max-time $TIME -d "chat_id=$NOTIFY_TELEGRAM_CHAT_ID&disable_web_page_preview=1&text=$TEXT" $URL >/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user