mirror of
https://github.com/philippdieter/puppet-ldapquery.git
synced 2025-10-13 04:54:47 +00:00
Improve jenkins build and potential to publish
This commit is contained in:
parent
23d7e2402f
commit
35b795632b
6
.env.sh
Normal file
6
.env.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ -x ~/.rbenv/bin/rbenv ]; then
|
||||
export PATH="$HOME/.rbenv/bin:$PATH"
|
||||
eval "$(~/.rbenv/bin/rbenv init -)"
|
||||
fi
|
27
Jenkinsfile
vendored
27
Jenkinsfile
vendored
@ -1,19 +1,30 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
triggers { pollSCM('*/15 * * * *') }
|
||||
|
||||
environment {
|
||||
PATH = "$PATH:~/.rbenv/bin"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('bundle') {
|
||||
stage('test') {
|
||||
steps {
|
||||
sh 'bundle'
|
||||
sh '. .env.sh && printenv && bundle'
|
||||
sh '. .env.sh && bundle exec rake test'
|
||||
}
|
||||
}
|
||||
stage('rake test') {
|
||||
steps {
|
||||
sh 'bundle exec rake test'
|
||||
|
||||
stage('build') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
}
|
||||
stage('module:build') {
|
||||
|
||||
steps {
|
||||
sh 'bundle exec rake module:build'
|
||||
sh '. .env.sh && bundle exec rake clean'
|
||||
sh '. .env.sh && bundle exec rake build'
|
||||
|
||||
sh '[ "$(git rev-list -n 1 $(git tag | tail -n 1 ))" == "$(git rev-list -n 1 HEAD)" ] && bundle exec rake publish pkg/*.tar.gz'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ module PuppetX
|
||||
tls = Puppet[:ldaptls]
|
||||
ca_file = "#{Puppet[:confdir]}/ldap_ca.pem"
|
||||
|
||||
# TODO if not exists ldap_ca.pem fail
|
||||
|
||||
conf = {
|
||||
host: host,
|
||||
port: port
|
||||
|
Loading…
x
Reference in New Issue
Block a user