From 124944302a07c85cd84124e84a5c51f51f780f41 Mon Sep 17 00:00:00 2001 From: mahdi Date: Mon, 20 Jul 2026 19:32:45 +0330 Subject: [PATCH] change again --- .gitlab-ci.yml | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55038a6..ed48e7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,25 +7,13 @@ stages: # ----------------------------------------------------------------- .notify_template: ¬ify_template after_script: + - echo "Checking Telegram Variables..." + - echo "Chat ID is set to: ${TELEGRAM_CHAT_ID}" - | - # Check if Telegram token is available before sending - if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then - MESSAGE="🚀 *GitOps Pipeline Status Notification* - -------------------------------------- - *Project:* ${CI_PROJECT_NAME} - *Stage:* ${CI_JOB_STAGE} - *Status:* ${CI_JOB_STATUS} - *Branch:* ${CI_COMMIT_REF_NAME} - *Author:* ${CI_COMMIT_AUTHOR} - *Commit:* ${CI_COMMIT_TITLE} - -------------------------------------- - [View Pipeline Details](${CI_PIPELINE_URL})" - - curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ - -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "parse_mode=Markdown" \ - -d "text=${MESSAGE}" - fi + curl -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ + -d "chat_id=${TELEGRAM_CHAT_ID}" \ + -d "parse_mode=Markdown" \ + -d "text=Test notification from GitLab pipeline" # ----------------------------------------------------------------- # Stage 1: DevSecOps Vulnerability Scanning