Skip to content

Commit

Permalink
chore: testing blocks in slack
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Oct 1, 2020
1 parent 861efe5 commit d2fe0b0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pipeline {
options { skipDefaultCheckout() }
steps {
withGithubNotify(context: 'Checkout') {
testSlack()
pipelineManager([ cancelPreviousRunningBuilds: [ when: 'PR' ] ])
deleteDir()
gitCheckout(basedir: "${BASE_DIR}")
Expand Down Expand Up @@ -198,3 +199,31 @@ pipeline {
}
}
}

def testSlack() {
blocks = [
[
"type": "section",
"text": [
"type": "mrkdwn",
"text": "Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you'd like to take the Paper Company investors to dinner tonight.\n\n *Please select a restaurant:*"
]
],
[
"type": "divider"
],
[
"type": "section",
"text": [
"type": "mrkdwn",
"text": "*Farmhouse Thai Cuisine*\n:star::star::star::star: 1528 reviews\n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here"
],
"accessory": [
"type": "image",
"image_url": "https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg",
"alt_text": "alt text for image"
]
]
]
slackSend(channel: "#beats-ci-builds", blocks: blocks)
}

0 comments on commit d2fe0b0

Please sign in to comment.