drone-rocket
Drone plugin for sending Rocket.Chat messages to a channel using the latest REST API v1.
Sending Rocket.Chat message using a binary, Docker or Drone CI.
There are three ways to send notifications.
drone-rocket \
--url xxxx \
--user-id xxxx \
--token xxx \
--channel xxx \
--message "Test Message"
docker run --rm \
-e URL=xxxxxxx \
-e USER_ID=xxxxxxx \
-e TOKEN=xxxxxxx \
-e CHANNEL='#general' \
-e AVATAR_URL=http://example.com/xxxx.png \
-e MESSAGE=test \
mike1pol/drone-rocket
Execute from the working directory:
docker run --rm \
-e URL=xxxxxxx \
-e USER_ID=xxxxxxx \
-e TOKEN=xxxxxxx \
-e CHANNEL='#general' \
-e AVATAR_URL='https://upload.wikimedia.org/wikipedia/commons/6/69/June_odd-eyed-cat_cropped.jpg' \
-e MESSAGE=test \
-e DRONE_REPO_OWNER=mike1pol \
-e DRONE_REPO_NAME=drone-rocket \
-e DRONE_COMMIT_SHA=e5e82b5eb3737205c25955dcc3dcacc839b7be52 \
-e DRONE_COMMIT_BRANCH=master \
-e DRONE_COMMIT_AUTHOR=mike1pol \
-e [email protected] \
-e DRONE_COMMIT_MESSAGE=Test_Your_Commit \
-e DRONE_BUILD_NUMBER=1 \
-e DRONE_BUILD_STATUS=success \
-e DRONE_BUILD_LINK=http://github.com/mike1pol/drone-rocket \
-e DRONE_JOB_STARTED=1477550550 \
-e DRONE_JOB_FINISHED=1477550750 \
-v $(pwd):$(pwd) \
-w $(pwd) \
mike1pol/drone-rocket
Test the package with the following command:
$ make test