tg-go

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 17 Imported by: 0

README

Telegram-Jenkins

Build Status Build status

Building jenkins project from telegram app

Features

  • list all projects(/sub projects) in chat
  • manage who can use this bot
  • build as one click

Requirements

  • dep for install go dependencies
  • bot token generate from bot father
  • jenkins server

Installation

Download one of the executable file from Release

and change permission if needed

Write some configurations:

dbPath: bot.db
jenkins:
  server:'jenkins-server-address'
  username: jenkins_admin
  password: 'jenkins_password'
  # dont change this value. if you want get notification from jenkins server you need install a notification plugin which will use this field
  telegramChatId: 'Telegram_Chat_ID'
botToken: 'bot_token_generated_from_bot_father'
superAdmin: 'default_admin(telegram_username)'

Notification

If you don't need build notification you can skip this step

  • Download notification plugin from here and then install it on your jenkins server
  • Notification configuration please checkout the docs
  • ATM: you must add a parameterized build named Telegram_Chat_ID and leave the default value empty
  • Add a post build step(Telegram Notification) in your jenkins project
  • fill up the Global Notification Target as ${Telegram_Chat_ID} received from your last step's settings as a env variable.
  • done

Why need Telegram_Chat_ID because jenkins need to know which chat you want post message to. this variable will be replaced in tg-bot. the bot get the chat_id from the telegram's chat.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL