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 {
script {
String callToAction = sh(script: "curl https://kouiz.dev.lookingfora.name/api/presentation/turn", returnStdout: true)
if (callToAction) {
rocketSend(
channel: '#le-kouiz',
message: """
${callToAction}
> [Répondre à la question du jour](https://kouiz.dev.lookingfora.name/) <
""".stripIndent(),
rawMessage: true
)
def currentTime = new Date()
def hour = currentTime.hours
def isMorning = hour < 12
if (isMorning) {
String callToAction = sh(script: "curl https://kouiz.dev.lookingfora.name/api/presentation/turn", returnStdout: true)
if (callToAction) {
rocketSend(
avatar: "https://kouiz.dev.lookingfora.name/assets/panda.png",
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 {
}
}
}
}