2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Jenkins2のPipelineScriptでChatworkに投稿する

Last updated at Posted at 2017-08-16

Jenkins2のパイプラインでChatworkプラグインを使わずに投稿したかったのでCurl使ってみました。

stage('Chatwork') 
{
    def ChatworkToken = "チャットワークAPIトークン"
    def RoomID = "ルームID"
    def PostMessage = "[info][title]タイトル[/title]投稿文[/info]"
    def PostURL = "https://api.chatwork.com/v2/rooms/$RoomID/messages"
    sh("curl -X POST -H \"X-ChatWorkToken:$ChatworkToken\" -d \"body=$PostMessage\" \"$PostURL\"")
}
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?