Giter Club home page Giter Club logo

rocket's Introduction

This is a small application designed for sending notifications to RocketChat. It was developed with the idea of sending notifications from CI pipelines to channels.

🔧   Installation

The binary is available for Linux, macOS and Windows from the GitHub Releases page.

💡   Example

First a ".rocket" folder must be created in the project directory.

mkdir .rocket

In the next step a template for the notification is created in the folder just created.

cat << EOF > .rocket/my-template.yml
channel: '#my-channel'
text: 'Hello from {{.Env.SENDER}}'
EOF

Since the YAML file is processed with the template package, as in this example, environment variables can be used. The created template can now be used to send a notification.

ROCKET_HOST=https://rocketchat.com ROCKET_USER=myuser ROCKET_PASS=mypass SENDER=Rocket rocket notify my-template

The environment variables can of course also be set in advance. This includes variables set in CI Pipelines.

📐   Configuration Options

The rocket tool accepts the following arguments.

Name Type Required Description
TEMPLATE string The name of the template to be used
--directory, -d string The directory in which to search for templates (default: .rocket)

Additionally some options are configured via environment variables.

Name Type Required Description
ROCKET_HOST string The URL of the RocketChat server to connect to
ROCKET_USER string The RocketChat user's username
ROCKET_PASS string The RocketChat user's password

ROCKET_USER and ROCKET_PASS are not required, since they are interactively queried from the console when not available.

Please refer to the RocketChat documentation to find out which fields can be set in the template file(s).

📜   License

This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.

rocket's People

Contributors

krakowski avatar

Stargazers

Kristin Rutenkolk avatar

Watchers

James Cloos 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.