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.
2020-01-29 12:06:54 +00:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
environment {
|
2020-02-05 18:07:02 +00:00
|
|
|
PROJECT_NAME = 'discover'
|
2020-01-29 12:06:54 +00:00
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Checkout') {
|
|
|
|
steps {
|
2020-01-31 20:34:18 +00:00
|
|
|
setEnv()
|
2020-01-29 12:06:54 +00:00
|
|
|
}
|
|
|
|
}
|
2020-01-31 20:34:18 +00:00
|
|
|
stage('Deploy') {
|
2020-01-29 12:06:54 +00:00
|
|
|
when {
|
|
|
|
branch 'master'
|
|
|
|
}
|
|
|
|
environment {
|
2020-01-31 20:34:18 +00:00
|
|
|
CREDENTIALS = credentials('docker-registry')
|
2020-01-29 12:06:54 +00:00
|
|
|
}
|
|
|
|
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'
|
2020-01-29 12:06:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2020-01-31 20:34:18 +00:00
|
|
|
sendEmail()
|
2020-01-29 12:06:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|