BCDevOps/devops-platform-workshops

Update Slack references to RocketChat

Closed this issue · 4 comments

Update Slack references to RocketChat

we need perhaps a service account that has permissions just too post messages to the appropriate channel

initContainers:
      - name: init
        image: giantswarm/tiny-tools
        command: ["/bin/sh", "-c", "c=$(curl -H "X-Auth-Token: [service account token]" \
     -H "X-User-Id: [service account id]" \
     -H "Content-type:application/json" \
    https://chat.pathfinder.gov.bc.ca/api/v1/chat.sendMessage \
     -d '{"message": { "rid": [current rocket chat ocp101 room id], "msg": "This is a test!" }}')"]

params we need would be

  • service account token
  • user id to send message as, perhaps an ocp101-bot account
  • the ocp101 room id, this will be changing all the time so gota figuire that out
filiy commented

I think the instructor of the course can make an incoming web hook in Rocket Chat on the day of the course.

Or someone in the class can create and share as all users in Rocket Chat can create incoming web hooks.

Might be good practice.

You end up with a webhook URL and token.

What do you think @cvarjao @stewartshea ?

curl -X POST -H 'Content-Type: application/json' --data '{"text":"Example message","attachments":[{"title":"Rocket.Chat","title_link":"https://rocket.chat","text":"Rocket.Chat, the best open source chat","image_url":"/images/integration-attachment-example.png","color":"#764FA5"}]}' https://chat-test.pathfinder.gov.bc.ca/hooks/YLJjzggLMxQERrK6e/E9ivvvSNivzRhAvJdcKY3uewCBB9pwSkegarESWQHwppr8jk

fixed in #26 closing.