String cron_string = BRANCH_NAME == "master" ? "@daily" : "" pipeline { agent any options { ansiColor('xterm') parallelsAlwaysFailFast() } triggers { cron(cron_string) } stages { stage('Lint') { agent { docker { image "chn2guevara/nvim:stable" alwaysPull true } } steps { sh 'apk --no-cache add stylua luacheck' sh 'make lint' } } stage('Test') { matrix { agent { docker { image "chn2guevara/nvim:${TAG}" alwaysPull true customWorkspace "workspace/${JOB_NAME}/${BUILD_NUMBER}/IMAGE/chn2guevara-nvim-${TAG}/" } } axes { axis { name 'TAG' values 'stable', 'nightly' } } stages { stage('Test') { steps { sh ''' apk update && \ apk add go && \ mkdir tmp && \ cd tmp && \ git clone https://github.com/prometheus/prometheus.git . && \ GO111MODULE=on go install github.com/prometheus/prometheus/cmd/promtool && \ export PATH="/root/go/bin/:${PATH}" && \ cd .. && \ ls -l && \ make test ''' } } } } } } post { always { step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "christian+jenkins@segundo.io", sendToIndividuals: true]) } } }