# Source: secret/templates/slack-messages.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: slack-messages
  namespace: jx
  labels:
    gitops.jenkins-x.io/pipeline: 'namespaces'
data:
  SLACK_LARGE_TEST_FAILED_MSG: |
    {
      "channel": "#sdlc-dev",
      "attachments": [
        {
          "color": "#e76f51",
          "blocks": [
            {
              "type": "section",
              "text": {
                "type": "mrkdwn",
                "text": "Large Test *${STATUS}* on *${ENV}* environment. \n *SHA*: \`${GIT_SHA}\` \n*Details:* \`\`\`${DETAILS}\`\`\`"
              },
              "accessory": {
                "type": "button",
                "text": {
                  "type": "plain_text",
                  "text": "Large Tests Report",
                  "emoji": true
                },
                "value": "click_me_123",
                "url": "${REPORT_URL}",
                "action_id": "button-action"
              }
            },
            {
              "type": "divider"
            },
            {
              "type": "image",
              "image_url": "https://i1.wp.com/thetempest.co/wp-content/uploads/2017/08/The-wise-words-of-Michael-Scott-Imgur-2.jpg?w=320&ssl=1",
              "alt_text": "inspiration"
            },
            {
              "type": "context",
              "elements": [
                {
                  "type": "mrkdwn",
                  "text": "VITech SDLC"
                },
                {
                  "type": "image",
                  "image_url": "https://static2.clutch.co/s3fs-public/logos/cf05ec722c2e35d3158c03924a09dd2e.png",
                  "alt_text": "cute cat"
                }
              ]
            }
          ]
        }
      ]
    }
  SLACK_LARGE_TEST_SUCCESS_MSG: |
    {
      "channel": "#sdlc-dev",
      "attachments": [
        {
          "blocks": [
            {
              "type": "section",
              "text": {
                "type": "mrkdwn",
                "text": ":tada: Large Test *${STATUS}* on *${ENV}* environment. \n *SHA*: \`${GIT_SHA}\` \n*Details:* \`\`\`${DETAILS}\`\`\`"
              },
              "accessory": {
                "type": "button",
                "text": {
                  "type": "plain_text",
                  "text": "Large Tests Report",
                  "emoji": true
                },
                "value": "click_me_123",
                "url": "${REPORT_URL}",
                "action_id": "button-action"
              }
            },
            {
              "type": "divider"
            },
            {
              "type": "context",
              "elements": [
                {
                  "type": "mrkdwn",
                  "text": "VITech SDLC"
                },
                {
                  "type": "image",
                  "image_url": "https://static2.clutch.co/s3fs-public/logos/cf05ec722c2e35d3158c03924a09dd2e.png",
                  "alt_text": "cute cat"
                }
              ]
            }
          ]
        }
      ]
    }
