Created
July 30, 2023 11:03
-
-
Save arsalanses/f6805dd34a2892407340831cc7409024 to your computer and use it in GitHub Desktop.
RocketChat notify bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TIME="10" | |
| TEXT="Deploy status: $${1}\nProject: $CI_PROJECT_NAME\nURL: $CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID/\nBranch: $CI_COMMIT_REF_SLUG\nUser: $${GITLAB_USER_NAME}" | |
| curl -s -X POST --max-time $${TIME} \ | |
| -H "X-Auth-Token: Token" \ | |
| -H "X-User-Id: Id" \ | |
| -H "Content-type:application/json" \ | |
| https://example.org/api/v1/chat.postMessage \ | |
| -d "{ \"channel\": \"#pipelines-stats\", \"text\": \"$${TEXT}\" }" \ | |
| > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment