From 362af4e16d7cdfa1512a6f2f154f055907b4d900 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Tue, 23 Jul 2024 21:43:05 +0200 Subject: add ci --- Jenkinsfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Jenkinsfile (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..1293357 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,24 @@ +String cron_string = BRANCH_NAME == "master" ? "@weekly" : "" + +pipeline { + agent any + triggers { cron(cron_string) } + options { ansiColor('xterm') } + stages { + stage('Build') { steps { sh 'bash .scripts.d/20-build.sh' } } + stage('Test') { steps { sh 'bash .scripts.d/30-test.sh' } } + stage('Publish') { + environment { DOCKERHUB_TOKEN = credentials('DOCKERHUB_TOKEN') } + steps { sh 'bash .scripts.d/40-publish.sh' } + } + } + post { + always { + junit 'build/reports/*.xml' + step([$class: 'Mailer', + notifyEveryUnstableBuild: true, + recipients: "christian+jenkins@segundo.io", + sendToIndividuals: true]) + } + } +} -- cgit v1.2.3