@Library("cadoles") _ pipeline { agent { dockerfile { label 'docker' filename 'Dockerfile' dir 'misc/ci' } } triggers { cron('0 10 * * 1-5 \n 0 16 * * 1-5') } parameters { booleanParam(name: 'FORCE_SEND', defaultValue: false, description: 'Force send of message') } stages { stage("Send call to action") { when { allOf { anyOf { triggeredBy 'TimerTrigger' expression { params.FORCE_SEND == true } } } } steps { script { String callToAction = sh(script: "curl https://kouiz.dev.lookingfora.name/api/presentation/turn", returnStdout: true) if (callToAction) { rocketSend( channel: '#le-kouiz', message: newsletter, rawMessage: true ) } } } } } }