2018-09-19 00:06:08 +00:00
|
|
|
pipeline {
|
2018-09-27 19:21:30 +00:00
|
|
|
agent { label 'linux' }
|
|
|
|
|
|
|
|
options {
|
|
|
|
timeout(time: 1, unit: 'HOURS')
|
2018-10-12 02:51:12 +00:00
|
|
|
buildDiscarder(logRotator(daysToKeepStr: '10'))
|
2018-09-27 19:21:30 +00:00
|
|
|
timestamps()
|
2018-09-19 00:06:08 +00:00
|
|
|
}
|
2018-09-19 21:48:15 +00:00
|
|
|
|
2018-09-27 19:21:30 +00:00
|
|
|
triggers {
|
2018-10-12 02:47:13 +00:00
|
|
|
pollSCM('H * * * *')
|
2018-09-19 21:48:15 +00:00
|
|
|
}
|
|
|
|
|
2018-09-27 19:21:30 +00:00
|
|
|
stages {
|
|
|
|
stage('Build & test') {
|
|
|
|
steps {
|
|
|
|
sh 'make migrate check'
|
|
|
|
}
|
2018-09-19 21:48:15 +00:00
|
|
|
}
|
|
|
|
|
2018-09-27 19:21:30 +00:00
|
|
|
stage('Containers') {
|
|
|
|
steps {
|
|
|
|
sh 'make container'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Publish container') {
|
|
|
|
when { expression { infra.isTrusted() } }
|
|
|
|
|
|
|
|
steps {
|
|
|
|
withCredentials([[$class: 'ZipFileBinding',
|
|
|
|
credentialsId: 'jenkins-dockerhub',
|
|
|
|
variable: 'DOCKER_CONFIG']]) {
|
|
|
|
sh 'make publish'
|
|
|
|
}
|
2018-09-19 21:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-09-19 00:06:08 +00:00
|
|
|
}
|
2018-09-27 19:21:30 +00:00
|
|
|
|
|
|
|
// vim: ft=groovy
|