forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPublishNotification_Jenkinsfile.txt
15 lines (15 loc) · 1.03 KB
/
PublishNotification_Jenkinsfile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
PublishNotification_Jenkinsfile.run()
PublishNotification_Jenkinsfile.pipeline(groovy.lang.Closure)
PublishNotification_Jenkinsfile.echo(Executing on agent [label:none])
PublishNotification_Jenkinsfile.stage(notify, groovy.lang.Closure)
PublishNotification_Jenkinsfile.script(groovy.lang.Closure)
PublishNotification_Jenkinsfile.publishNotification({icon=:white_check_mark:, message=Successful Build, extra=extra, manifest=1.2.0/opensearch-1.2.0.yml, credentialsId=jenkins-build-notice-webhook})
publishNotification.string({credentialsId=jenkins-build-notice-webhook, variable=WEBHOOK_URL})
publishNotification.withCredentials([WEBHOOK_URL], groovy.lang.Closure)
publishNotification.sh(curl -XPOST --header "Content-Type: application/json" --data '{"result_text":":white_check_mark:
JOB_NAME=dummy_job
BUILD_NUMBER=[123]
MESSAGE=Successful Build
BUILD_URL: htth://BUILD_URL_dummy.com
MANIFEST: 1.2.0/opensearch-1.2.0.yml
extra"}' "WEBHOOK_URL")