feat: only send excerpt in channel
Some checks failed
kipp-news/pipeline/head There was a failure building this commit
Some checks failed
kipp-news/pipeline/head There was a failure building this commit
This commit is contained in:
parent
fae8990599
commit
4e8bd5d1cf
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -48,10 +48,18 @@ pipeline {
|
||||
script {
|
||||
withCredentials([string(credentialsId: 'NEWS_API_KEY', variable: 'NEWS_API_KEY')]) {
|
||||
String newsletter = sh(script: "bash ./generate-newsletter.sh", returnStdout: true)
|
||||
Date now = new Date()
|
||||
|
||||
if (newsletter) {
|
||||
rocketSend(
|
||||
channel: '@wpetit',
|
||||
message: newsletter,
|
||||
message: newsletter.slice(0, 250) + "\n[...]",
|
||||
attachments: [
|
||||
[
|
||||
title: "cazette_${now.format("dd/MM/yyyy", TimeZone.getTimeZone('Europe/Paris'))}.md"
|
||||
text: newsletter
|
||||
]
|
||||
]
|
||||
rawMessage: true
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user