feat: only send excerpt in channel
All checks were successful
kipp-news/pipeline/head This commit looks good

This commit is contained in:
wpetit 2025-04-14 09:29:48 +02:00
parent fae8990599
commit 497b92fcb3

11
Jenkinsfile vendored
View File

@ -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
]
]
)
}
}