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
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env groovy
pipeline {
agent any
environment {
2020-02-05 18:07:02 +00:00
PROJECT_NAME = 'discover'
}
stages {
stage('Checkout') {
steps {
2020-01-31 20:34:18 +00:00
setEnv()
}
}
2020-01-31 20:34:18 +00:00
stage('Deploy') {
when {
branch 'master'
}
environment {
2020-01-31 20:34:18 +00:00
CREDENTIALS = credentials('docker-registry')
}
steps {
2021-04-27 14:34:01 +00:00
sh 'docker-compose build --parallel'
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker-compose push'
}
}
}
post {
always {
2020-01-31 20:34:18 +00:00
sendEmail()
}
}
}