feat: initial commit
This commit is contained in:
45
Jenkinsfile
vendored
Normal file
45
Jenkinsfile
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
@Library("cadoles") _
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile {
|
||||
label 'docker'
|
||||
filename 'Dockerfile'
|
||||
dir 'misc/ci'
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
cron('0 10 * * 1-5')
|
||||
cron('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
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
5
misc/ci/Dockerfile
Normal file
5
misc/ci/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN apk add nodejs npm jq bash curl ca-certificates python3 build-base coreutils
|
||||
|
||||
SHELL ["/bin/bash"]
|
Reference in New Issue
Block a user