Very early work on a Slack ChatOps bot, written in Akka/Scala.
Released under Apache 2.0 License.
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.
You will need a Slack API token. You need to add following lines to your config/sumobot.conf:
slack { api.token = "..." } 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.
To build project in default Scala version:
gradlew build To build project in any supported Scala version:
gradlew build -PscalaVersion=2.12.17 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.
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
- Make sure you have all credentials - access to
Open Sourcevault in 1Password.- Can login as
sumoapihttps://oss.sonatype.org/index.html - 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 - Have nexus and signing credentials in
~/.gradle/gradle.propertiesnexus_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}
- Can login as
- Remove
-SNAPSHOTsuffix fromversioninbuild.gradle - 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}" - Perform a release in selected Scala versions:
./gradlew build publish -PscalaVersion=2.12.17 ./gradlew build publish -PscalaVersion=2.13.10 - 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
- Update the
README.mdandCHANGELOG.mdwith the new version and set upcoming snapshotversioninbuild.gradle, ex.3.0.4-SNAPSHOT - 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