pipeline {
agent any
stages {
stage('exec') {
environment {
apiKey="xxx"
roomId="yyy 数字のみ"
url="https://api.chatwork.com/v2/rooms/${roomId}/messages"
message="Jenkins Job ${env.JOB_NAME} : ${currentBuild.currentResult}"
}
steps {
sh('curl -X POST -H "X-ChatWorkToken: $apiKey" -d "body=$message" "$url"')
// bad
// sh '''
// curl -X POST -H "X-ChatWorkToken: $apiKey" -d "body=${message}" "${url}"
// '''
}
}
}
}
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
00