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

17
Jenkinsfile vendored
View File

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