This repository has been archived on 2024-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
docker-discover/Jenkinsfile

33 lines
721 B
Groovy

#!/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()
}
}
}