Git Product home page Git Product logo

l3-gobot's Introduction

L3-Gobot

l3-37

A Slack bot inspired by Hubot written in Golang using the go-joe/joe library.

Named after the piloting droid L3-37, aka L3.

This bot will trigger a remote Jenkins job when you interact with it in Slack. It can also save information to a redis store.

Quickstart

  1. Clone the repo to any directory and navigate into the new cloned directory.
  2. Run go get && go install in the l3-gobot directory.
  3. Start a redis server, running redis-server, in a separate terminal window. (Install redis-server if you do not already have it on your system)
  4. Copy .env.example to .env and fill in secret information.
  5. Run go run main.go to start the bot.
  6. Test out the bot by running a command in Slack: @bot-name ping and if it is configured correctly the bot should respond in Slack with PONG

Secrets needed for .env

Key Description
SLACK_TOKEN Follow Slack docs to add an app to your Slack workspace. After creation the app will be given a token.
JENKINS_CRUMB Follow this article on how to retrieve a Jenkins crumb in order to authenticate a remote Jenkins API call to your Jenkins server
JENKINS_USER Service account user for Jenkins server
JENKINS_USER_TOKEN Log in to Jenkins server UI with the JENKINS_USER and configure an API token
JENKINS_URL Full URL (including https://) for Jenkins server

Future Features

  • Containerize bot and redis setup
  • Deploy bot somewhere
  • Add authNZ to limit who can run certain commands
  • Add tests
  • Add Jenkins build info output and/or command to get information on the triggered job

l3-gobot's People

Contributors

sharkysharks avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.