Skip to content

huynxtb/jenkins-telegram-notifier-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Notifier

Telegram Notifier provides a bridge between Jenkins and Microsoft Teams through the built-in webhook functionality.

  • Get success and fail messages about your job

The purpose

The Jenkins Telegram Notifier plugin was made to share results of a build to a Telegram channel using the bot with access token.

Pipeline

Telegram Notifier supports Jenkins Pipeline.

Parameters

  • accessToken (required)
  • chatId (required)
  • title (required)
    • The title of the message.
  • result (required)
    • Sets notice message (SUCCESS - green, UNSTABLE - yellow, FAILURE - red, ABORTED - grey).
  • branchName
    • If set, current branch build will show.
  • commitId
    • If set, current commit build will show.
  • description
    • If set, the description will show on the message.
  • webUrl
    • If set, the web url will show on the message.
  • jobLink
    • If set, the job url will show on the message.
  • buildNumber
    • If set, current build number build will show.
  • timeZone

Example

pipeline {
  agent any

  post {
    always {
      	telegramNotifier accessToken: "${TELEGRAM_ACCESS_TOKEN}", chatId: "${TELEGRAM_CHAT_ID}", title: "${PROJECT_NAME}", jobLink: "${JENKINS_SERVER}/job/${JOB_NAME}/${BUILD_NUMBER}/", branchName: "${BRANCH_NAME}", commitId: "${COMMIT_ID}", description: "${PROJECT_DESCRIPTION}", result: currentBuild.currentResult, webUrl: "${WEBSITE_URL}", buildNumber: currentBuild.number, timeZone: 'Asia/Bangkok'
    }
  }
}

Install Plugin

  • Go to your Jenkins Server with url /pluginManager/advanced
  • Scroll to section Deploy Plugin
  • Select the file hpi in project with path: ../telegram-notifier/target
  • Finally click button deploy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published