sumobot

A Slack bot implemented in Akka

License

License

GroupId

GroupId

com.sumologic.sumobot
ArtifactId

ArtifactId

sumobot
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

sumobot
A Slack bot implemented in Akka
Project URL

Project URL

https://github.com/SumoLogic/sumobot
Source Code Management

Source Code Management

https://github.com/SumoLogic/sumobot

Download sumobot

How to add to project

<!-- https://jarcasting.com/artifacts/com.sumologic.sumobot/sumobot/ -->
<dependency>
    <groupId>com.sumologic.sumobot</groupId>
    <artifactId>sumobot</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.sumologic.sumobot/sumobot/
implementation 'com.sumologic.sumobot:sumobot:1.0.2'
// https://jarcasting.com/artifacts/com.sumologic.sumobot/sumobot/
implementation ("com.sumologic.sumobot:sumobot:1.0.2")
'com.sumologic.sumobot:sumobot:jar:1.0.2'
<dependency org="com.sumologic.sumobot" name="sumobot" rev="1.0.2">
  <artifact name="sumobot" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.sumologic.sumobot', module='sumobot', version='1.0.2')
)
libraryDependencies += "com.sumologic.sumobot" % "sumobot" % "1.0.2"
[com.sumologic.sumobot/sumobot "1.0.2"]

Dependencies

compile (26)

Group / Artifact Type Version
com.github.slack-scala-client : slack-scala-client_2.11 jar 0.2.6
com.typesafe.akka : akka-testkit_2.11 jar 2.5.11
com.typesafe.akka : akka-stream_2.11 jar 2.5.11
org.scalatest : scalatest_2.11 jar 2.2.5
junit : junit jar 4.12
com.offbytwo.jenkins : jenkins-client jar 0.3.8
commons-beanutils : commons-beanutils jar 1.9.4
org.scalatra.scalate : scalate-core_2.11 jar 1.9.4
org.slf4j : slf4j-log4j12 jar 1.7.12
com.amazonaws : aws-java-sdk-support jar 1.11.393
com.amazonaws : aws-java-sdk-s3 jar 1.11.393
org.quartz-scheduler : quartz jar 2.2.1
com.mchange : c3p0 jar 0.9.5.4
net.liftweb : lift-json_2.11 jar 2.6-RC1
org.scala-lang : scala-compiler jar 2.11.12
org.scala-lang : scalap jar 2.11.12
org.scala-lang : scala-reflect jar 2.11.12
com.fasterxml.jackson.core : jackson-databind jar 2.9.10
com.fasterxml.jackson.core : jackson-annotations jar 2.9.10
com.fasterxml.jackson.core : jackson-core jar 2.9.10
org.dom4j : dom4j jar 2.1.1
com.google.guava : guava jar 27.1-jre
com.typesafe.play : play-json_2.11 jar 2.7.1
com.pauldijou : jwt-play-json_2.11 jar 3.1.0
com.typesafe.akka : akka-http_2.11 jar 10.0.11
org.joda : joda-convert jar 1.9.2

test (1)

Group / Artifact Type Version
org.mockito : mockito-core jar 2.0.31-beta

Project Modules

There are no modules declared in this project.

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.12

[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-1.0.9:
    export RELEASE_VERSION=sumobot-1.0.9
    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.11.12
    ./gradlew build publish -PscalaVersion=2.12.12
    ./gradlew build publish -PscalaVersion=2.13.3
    
  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. 1.0.9-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
    
com.sumologic.sumobot

Sumo Logic, Inc.

Versions

Version
1.0.2
1.0.1
1.0.0