Jenkins Slack integration

后端 未结 8 775
一整个雨季
一整个雨季 2021-02-07 01:30

I want to use the Slack plugin in Jenkins to ping notifications to a Slack channel.

Jenkins says success when I test the connection, but I don\'t receive any notificatio

相关标签:
8条回答
  • 2021-02-07 02:23
    import os
    import sys
    from slacker import Slacker
    import base64
    
    def main():
        myPass=sys.argv[1]
        msgStr= sys.argv[2]
        channel = sys.argv[3]
    
        slack = Slacker(myPass)
        slack.chat.post_message(channel, msgStr)
        print msgStr
    
    if __name__ == '__main__':
        main()    
    

    python slack.py <token> < message str > <#channel>

    I couldn't get anything but 'failure' from the slack connection test in the config. I can use python from the same box so I don't know what the issue is so I may just use this simple script.

    0 讨论(0)
  • 2021-02-07 02:24

    I had similar issues.

    It worked for me when i unchecked "is Bot User?"

    starting Jenkins in console with 'jenkins' not with brew demon, though.

    Maybe that helps :) Greetings ^__^

    0 讨论(0)
提交回复
热议问题