Giter VIP home page Giter VIP logo

sumobot's Introduction

Build Status codecov.io

Sumo Bot

Very early work on a Slack ChatOps bot, written in Akka/Scala.

License

Released under Apache 2.0 License.

Starting Sumo Bot

Sumo Bot supports running on Slack or on a debug HTTP server (but only one at a time). All configuration is stored in config/sumobot.conf. You can see sample sumobot.conf in config/sumobot.conf.example.

Running on Slack

You will need a Slack API token. You need to add following lines to your config/sumobot.conf:

slack {
  api.token = "..."
}

Running on HTTP server

To run server locally, add following lines to your config/sumobot.conf:

http {
  host = "localhost"
  port = 8080
}

After starting Sumo Bot, you can visit started server at http://localhost:8080/.

To run server exposed to external world, change host to 0.0.0.0. For advanced configuration options, see: config/sumobot.conf.example.

[Dev] How to build

To build project in default Scala version:

gradlew build

To build project in any supported Scala version:

gradlew build -PscalaVersion=2.12.17

[Dev] Testing

For testing, change your consumer pom.xml or gradle.properties to depend on the SNAPSHOT version generated. Make sure, your consumer can resolve artifacts from a local repository.

[Dev] Managing Scala versions

This project supports multiple versions of Scala. Supported versions are listed in gradle.properties.

  • supportedScalaVersions - list of supported versions (Gradle prevents building with versions from outside this list)
  • defaultScalaVersion - default version of Scala used for building - can be overridden with -PscalaVersion

[Dev] How to release new version

  1. Make sure you have all credentials - access to Open Source vault in 1Password.
    1. Can login as sumoapi https://oss.sonatype.org/index.html
    2. Can import and verify the signing key:
      gpg --import ~/Desktop/api.private.key
      gpg-agent --daemon
      touch a
      gpg --use-agent --sign a
      gpg -k
      
    3. Have nexus and signing credentials in ~/.gradle/gradle.properties
      nexus_username=sumoapi
      nexus_password=${sumoapi_password_for_sonatype_nexus}
      signing.gnupg.executable=gpg
      signing.gnupg.keyName=${id_of_imported_sumoapi_key}
      signing.gnupg.passphrase=${password_for_imported_sumoapi_key}
      
  2. Remove -SNAPSHOT suffix from version in build.gradle
  3. Make a release branch with Scala version and project version, ex. sumobot-3.0.3:
    export RELEASE_VERSION=sumobot-3.0.3
    git checkout -b ${RELEASE_VERSION}
    git add build.gradle
    git commit -m "[release] ${RELEASE_VERSION}"
    
  4. Perform a release in selected Scala versions:
    ./gradlew build publish -PscalaVersion=2.12.17
    ./gradlew build publish -PscalaVersion=2.13.10
    
  5. Go to https://oss.sonatype.org/index.html#stagingRepositories, search for com.sumologic, close and release your repo. NOTE: If you had to login, reload the URL. It doesn't take you to the right page post-login
  6. Update the README.md and CHANGELOG.md with the new version and set upcoming snapshot version in build.gradle, ex. 3.0.4-SNAPSHOT
  7. Commit the change and push as a PR:
    git add build.gradle README.md CHANGELOG.md
    git commit -m "[release] Updating version after release ${RELEASE_VERSION}"
    git push
    

sumobot's People

Contributors

askelkar avatar dependabot[bot] avatar fdaca avatar ggarg2906sumo avatar mccartney avatar pdziedzic-sumo avatar pgrabowskisumo avatar piotr-sumo avatar zhalas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sumobot's Issues

Working?

Does this bot work? Looking a way to write a slack bot to query Sumo with formatted results in a slack channel..

Write a better README

The current README should include sections like:

  • Basic Getting started.
  • How to write a plugin.
  • Details on how this will be versioned/pluglished (i.e. semantic versioning, etc).
  • Maybe we can wire up an automatic build.

Help is not working 100%

Since help is implemented as a plugin, it appears to be missing some PluginAdded messages, which, in turn, means not all plugins are shown in help. Need to figure out a better way to ensure all registered plugins are actually shown in help.

Fix warnings in Scala 2.13

When using Scala 2.13, there are multiple warnings reported for the code base.
Let's have them fixed (if possible).

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.