mirror of
https://github.com/philippdieter/puppet-ldapquery.git
synced 2025-10-13 20:56:55 +00:00
33 lines
702 B
Groovy
33 lines
702 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
triggers { pollSCM('*/15 * * * *') }
|
|
|
|
environment {
|
|
PATH = "$PATH:~/.rbenv/bin"
|
|
}
|
|
|
|
stages {
|
|
stage('test') {
|
|
steps {
|
|
sh '. .env.sh && printenv && bundle install --without=development'
|
|
sh '. .env.sh && bundle exec rake test'
|
|
}
|
|
}
|
|
|
|
stage('build') {
|
|
when {
|
|
branch 'master'
|
|
}
|
|
|
|
steps {
|
|
sh 'git fetch --all --tags'
|
|
sh '. .env.sh && bundle exec rake clean'
|
|
sh '. .env.sh && bundle exec rake build'
|
|
|
|
sh '. .env.sh && [ "$(git rev-list -n 1 $(git tag | tail -n 1 ))" == "$(git rev-list -n 1 HEAD)" ] && bundle exec rake module:push || echo HEAD is not a tag'
|
|
}
|
|
}
|
|
}
|
|
}
|