From 37228237ce80bbe86c68cb2823ed5953f8c0121e Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Thu, 5 Jun 2014 14:28:17 +0300 Subject: [PATCH] Make 'jenkins-job-builder' repo configurable Partial implements: blueprint configurable-git-repos Change-Id: I0833ef8ed21c6f5fdfc96dacb43245569a1d1263 --- modules/jenkins/manifests/job_builder.pp | 6 ++++-- modules/openstack_project/manifests/jenkins.pp | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/jenkins/manifests/job_builder.pp b/modules/jenkins/manifests/job_builder.pp index 431b6921fe..c232a33545 100644 --- a/modules/jenkins/manifests/job_builder.pp +++ b/modules/jenkins/manifests/job_builder.pp @@ -4,6 +4,8 @@ class jenkins::job_builder ( $url = '', $username = '', $password = '', + $git_revision = 'master', + $git_url = 'https://git.openstack.org/openstack-infra/jenkins-job-builder' ) { # A lot of things need yaml, be conservative requiring this package to avoid @@ -23,8 +25,8 @@ class jenkins::job_builder ( vcsrepo { '/opt/jenkins_job_builder': ensure => latest, provider => git, - revision => 'master', - source => 'https://git.openstack.org/openstack-infra/jenkins-job-builder', + revision => $git_revision, + source => $git_url, } exec { 'install_jenkins_job_builder': diff --git a/modules/openstack_project/manifests/jenkins.pp b/modules/openstack_project/manifests/jenkins.pp index 49d8db0371..098aea45be 100644 --- a/modules/openstack_project/manifests/jenkins.pp +++ b/modules/openstack_project/manifests/jenkins.pp @@ -4,6 +4,8 @@ class openstack_project::jenkins ( $vhost_name = $::fqdn, $jenkins_jobs_password = '', $jenkins_jobs_username = 'gerrig', # This is not a typo, well it isn't anymore. + $jenkins_git_url = 'https://git.openstack.org/openstack-infra/jenkins-job-builder', + $jenkins_git_revision = 'master', $manage_jenkins_jobs = true, $ssl_cert_file = '', $ssl_key_file = '', @@ -151,9 +153,11 @@ class openstack_project::jenkins ( if $manage_jenkins_jobs == true { class { '::jenkins::job_builder': - url => "https://${vhost_name}/", - username => $jenkins_jobs_username, - password => $jenkins_jobs_password, + url => "https://${vhost_name}/", + username => $jenkins_jobs_username, + password => $jenkins_jobs_password, + git_revision => $jenkins_git_revision, + git_url => $jenkins_git_url, } file { '/etc/jenkins_jobs/config':