I’m using plugin/slack to send message to a slack channel, and I have to join an image with it. But the problem is that image have to be randomly selected from a list. But I’m a bit stuck because slack plugin doesn’t authorize natively to pass an image list in image_url field.
So I created previously a file
*.txt that’s contain only 1 url generated randomly. But I can’t pass it to slack.
Here is the code :
- name: pick random image name image: node commands: - /bin/bash random.sh > image.txt - name: slack blame image: plugins/slack settings: webhook: XXXX image_url: file:///image.txt template: > myTemplate
Anyone have a idea ?