Loading gitlab-ci.yml +5 −1 Original line number Diff line number Diff line Loading @@ -11,15 +11,17 @@ stages: stage: report variables: GIT_STRATEGY: "none" NOTIFICATION_ICON: "❓" NOTIFICATION_TYPE: "unknown" image: name: $CURL_IMAGE entrypoint: ["/usr/bin/env", "sh", "-c"] script: | test -n "${CI_COMMIT_TAG}" && NOTIFICATION_REVISION=${CI_COMMIT_TAG} || NOTIFICATION_REVISION=${CI_COMMIT_SHA} curl \ -X POST \ -H "Content-Type: application/json" \ -d "{\"chat_id\": \"${TELEGRAM_RECEPIENT}\", \"parse_mode\": \"html\", \"text\": \"<a href="${CI_PROJECT_URL}"><b>${CI_PROJECT_TITLE}</b></a> CI/CD pipeline run <a href="${CI_PIPELINE_URL}"><b>${NOTIFICATION_TYPE}</b></a>\"}" \ -d "{\"chat_id\": \"${TELEGRAM_RECEPIENT}\", \"parse_mode\": \"html\", \"text\": \"${NOTIFICATION_ICON} <a href="${CI_PROJECT_URL}"><b>${CI_PROJECT_TITLE}</b></a> <br>CI/CD pipeline run <a href="${CI_PIPELINE_URL}"><b>${NOTIFICATION_TYPE}</b></a> <br> - <b>revision</b>: \"}" \ https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage cache: [] dependencies: [] Loading @@ -30,6 +32,7 @@ stages: telegram-notification_success: extends: .common_telegram-notification variables: NOTIFICATION_ICON: "✅" NOTIFICATION_TYPE: "successful" rules: - when: on_success Loading @@ -37,6 +40,7 @@ telegram-notification_success: telegram-notification_failure: extends: .common_telegram-notification variables: NOTIFICATION_ICON: "💥" NOTIFICATION_TYPE: "failed" rules: - when: on_failure Loading
gitlab-ci.yml +5 −1 Original line number Diff line number Diff line Loading @@ -11,15 +11,17 @@ stages: stage: report variables: GIT_STRATEGY: "none" NOTIFICATION_ICON: "❓" NOTIFICATION_TYPE: "unknown" image: name: $CURL_IMAGE entrypoint: ["/usr/bin/env", "sh", "-c"] script: | test -n "${CI_COMMIT_TAG}" && NOTIFICATION_REVISION=${CI_COMMIT_TAG} || NOTIFICATION_REVISION=${CI_COMMIT_SHA} curl \ -X POST \ -H "Content-Type: application/json" \ -d "{\"chat_id\": \"${TELEGRAM_RECEPIENT}\", \"parse_mode\": \"html\", \"text\": \"<a href="${CI_PROJECT_URL}"><b>${CI_PROJECT_TITLE}</b></a> CI/CD pipeline run <a href="${CI_PIPELINE_URL}"><b>${NOTIFICATION_TYPE}</b></a>\"}" \ -d "{\"chat_id\": \"${TELEGRAM_RECEPIENT}\", \"parse_mode\": \"html\", \"text\": \"${NOTIFICATION_ICON} <a href="${CI_PROJECT_URL}"><b>${CI_PROJECT_TITLE}</b></a> <br>CI/CD pipeline run <a href="${CI_PIPELINE_URL}"><b>${NOTIFICATION_TYPE}</b></a> <br> - <b>revision</b>: \"}" \ https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage cache: [] dependencies: [] Loading @@ -30,6 +32,7 @@ stages: telegram-notification_success: extends: .common_telegram-notification variables: NOTIFICATION_ICON: "✅" NOTIFICATION_TYPE: "successful" rules: - when: on_success Loading @@ -37,6 +40,7 @@ telegram-notification_success: telegram-notification_failure: extends: .common_telegram-notification variables: NOTIFICATION_ICON: "💥" NOTIFICATION_TYPE: "failed" rules: - when: on_failure