I’ve setup chatops with Slack on my Gitlab account. All is working well! The problem I am having is that our running is running on windows powershell, so the example given (https://docs.gitlab.com/ee/ci/chatops/) for controlling what string gets returned to Slack doesn’t seem to work.
- echo -e "section_start:$( date +%s ):chat_reply\r\033[0K\n$( ls -la )\nsection_end:$( date +%s ):chat_reply\r\033[0K"
I’m trying to get the CI job to return a simple text string, rather than the full output of the CI job (which is pages long).
-echo -e is not a valid powershell echo command.
I’ve tried wrapping the example and calling it via “bash.exe ‘echo -e etc’” to force the command to be run in bash, but it doesn’t appear to work.
Can someone provide a more simple example of using the ':chat_reply ’ flag so I know how to format my string under powershell?
eg: a simple version of the example given might be :
“-echo -e ‘:chat_reply A string to return to Slack’”
I’ve no idea of the correct usage of :chat_reply to prevent gitlab from returning the full CI console as the string for Slack to display on job completion.
Thanks in advance for any suggestions!