String cron_string = BRANCH_NAME == "master" ? "@daily" : "" pipeline { agent none options { parallelsAlwaysFailFast() } triggers { cron(cron_string) } stages { stage('Lint') { agent { docker { image "chn2guevara/nvim:stable" alwaysPull true } } steps { sh 'make lint' } } stage('Test') { matrix { agent { docker { image "${DOCKER_IMAGE}" alwaysPull true customWorkspace "workspace/${JOB_NAME}/IMAGE/${DOCKER_IMAGE}/" } } axes { axis { name 'DOCKER_IMAGE' values 'chn2guevara/nvim:stable', 'chn2guevara/nvim: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 .. && \ make test ''' } } } } } } }