feat: only send excerpt in channel
All checks were successful
kipp-news/pipeline/head This commit looks good
All checks were successful
kipp-news/pipeline/head This commit looks good
This commit is contained in:
parent
fae8990599
commit
497b92fcb3
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@ -48,11 +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,
|
||||
rawMessage: true
|
||||
message: newsletter[0..250] + "\n[...]",
|
||||
attachments: [
|
||||
[
|
||||
title: "cazette_${now.format("yyyyMMdd", TimeZone.getTimeZone('Europe/Paris'))}.md",
|
||||
text: newsletter
|
||||
]
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user