An abstract tool for DevOps which streamlines day to day operations. It allow teams to implement custom workflows, dialogs, integrations and bind that pipeline to Mattermost slash commands. See commands
folder for sample integrations. For more information check doc
folder.
It will allow to integrate many providers and workflows by using configuration files. Ie.
For every provider it is possible to register different commands by only using configuration files.
See documents how to configure provider and register commands. Sample configuration:
- command: "version"
name: "Get GitLab Version"
description: "Gets gitlab version. `gitlab version check` will do upgrade check!"
exec:
- scripts/gitlab/gitlab_version.sh
response:
type: "ephemeral"
colors:
- color: "#ff0000"
status: "upgrade"
- color: "#00ff00"
status: "ok"
template: |
{{ if eq .Status "upgrade" }}
[GitLab](https://git.internal.mattermost.com) version is {{ .Data.version }}. Please upgrade to {{ .Data.latest }}.[Change Notes]({{ .Data.change_notes_url }})
{{ else }}
[GitLab](https://git.internal.mattermost.com) version is {{ .Data.version }}. {{ if .Data.latest }} Upgrade is not needed! {{ end }}
{{ end }}
Sample command output: /ops gitlab version check
In the following example, several Mattermost clients, are invoking /ops
commands, to interact with remote APIs accessed by the ops-tool.
Essentials:
Optionals:
For local installations public tunnel is not needed. For cloud Mattermost servers :
- Public tunnel to expose local endpoints to the internet if needed. ie. Ngrok.
See config.sample.yaml
for sample and read documentation how to configure the tool.
-
Create a Bot account.
-
If Public tunnel is needed, configure your tunnel.
-
Create Slash command. Enter
<BASE_URL>/hook
toRequest URL
and selectPOST
as request method. -
Create a Incoming Webhook. Do not select lock to this channel. It will be used for dialog and forms.
-
Define command group configuration locations at configuration file in
commands
sections. -
Define scheduled command definitions in configuration.
-
Define commands at commands folder.
-
Prepared scripts at scripts folder.
See documentation for detailed configuration and command reference.
To execute locally:
make go-run
Running all tests:
make test