#!/usr/bin/env groovy pipeline { agent any environment { PROJECT_NAME = 'discover' } stages { stage('Checkout') { steps { setEnv() } } stage('Deploy') { when { branch 'master' } environment { CREDENTIALS = credentials('docker-registry') } steps { sh 'docker-compose build --parallel' sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY' sh 'docker-compose push' } } } post { always { sendEmail() } } }