Add some additional options to Pipeline

This commit is contained in:
R. Tyler Croy 2018-09-27 12:21:30 -07:00
parent a2ebea0137
commit 8ddc878af8
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 30 additions and 20 deletions

50
Jenkinsfile vendored
View File

@ -1,31 +1,41 @@
pipeline {
agent { label 'linux' }
stages {
stage('Build & test') {
steps {
sh 'make migrate'
sh 'make check'
}
agent { label 'linux' }
options {
timeout(time: 1, unit: 'HOURS')
builddiscarder(logrotator(daystokeepstr: '10'))
timestamps()
}
stage('Containers') {
steps {
sh 'make container'
}
triggers {
pollscm('H * * * *')
}
stage('Publish container') {
when {
expression { infra.isTrusted() }
stages {
stage('Build & test') {
steps {
sh 'make migrate check'
}
}
steps {
withCredentials([[$class: 'ZipFileBinding',
credentialsId: 'jenkins-dockerhub',
variable: 'DOCKER_CONFIG']]) {
sh 'make publish'
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'
}
}
}
}
}
}
// vim: ft=groovy