feat: initial commit
All checks were successful
kouiz/pipeline/head This commit looks good

This commit is contained in:
2025-06-15 23:50:32 +02:00
parent 56bb5c25e8
commit 968fecdb8f

37
Jenkinsfile vendored
View File

@ -29,18 +29,33 @@ pipeline {
} }
steps { steps {
script { script {
String callToAction = sh(script: "curl https://kouiz.dev.lookingfora.name/api/presentation/turn", returnStdout: true) def currentTime = new Date()
if (callToAction) { def hour = currentTime.hours
rocketSend( def isMorning = hour < 12
channel: '#le-kouiz',
message: """ if (isMorning) {
${callToAction} String callToAction = sh(script: "curl https://kouiz.dev.lookingfora.name/api/presentation/turn", returnStdout: true)
if (callToAction) {
> [Répondre à la question du jour](https://kouiz.dev.lookingfora.name/) < rocketSend(
""".stripIndent(), avatar: "https://kouiz.dev.lookingfora.name/assets/panda.png",
rawMessage: true channel: '#le-kouiz',
) message: """
${callToAction}
> [Répondre à la question du jour](https://kouiz.dev.lookingfora.name/) <
""".stripIndent(),
rawMessage: true,
attachements: [
authorIcon: "https://kouiz.dev.lookingfora.name/assets/panda.png",
authorName: "Panda Kouiz"
]
)
}
} else {
} }
} }
} }
} }