Puppet module for Project_config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

init.pp 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 2014 Hewlett-Packard Development Company, L.P.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  4. # not use this file except in compliance with the License. You may obtain
  5. # a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. # License for the specific language governing permissions and limitations
  13. # under the License.
  14. #
  15. # Class: project_config
  16. #
  17. class project_config(
  18. $url = '',
  19. $base = '',
  20. ) {
  21. $config_dir = Vcsrepo['/etc/project-config']
  22. # Note project_config_ref is expected to be provided by facter
  23. # if you want to use it.
  24. if ($::project_config_ref != undef) {
  25. $revision = $::project_config_ref
  26. } else {
  27. $revision = 'master'
  28. }
  29. if (!defined($config_dir)) {
  30. vcsrepo { '/etc/project-config':
  31. ensure => latest,
  32. provider => git,
  33. revision => $revision,
  34. source => $url,
  35. }
  36. }
  37. $accessbot_channels_yaml = "/etc/project-config/${base}accessbot/channels.yaml"
  38. $gerritbot_channel_file = "/etc/project-config/${base}gerritbot/channels.yaml"
  39. $gerrit_acls_dir = "/etc/project-config/${base}gerrit/acls"
  40. $gerrit_notify_impact_file = "/etc/project-config/${base}gerrit/notify_impact.yaml"
  41. $jeepyb_project_file = "/etc/project-config/${base}gerrit/projects.yaml"
  42. $jenkins_job_builder_config_dir = "/etc/project-config/${base}jenkins/jobs"
  43. $jenkins_data_dir = "/etc/project-config/${base}jenkins/data"
  44. $jenkins_scripts_dir = "/etc/project-config/${base}jenkins/scripts"
  45. $nodepool_scripts_dir = "/etc/project-config/${base}nodepool/scripts"
  46. $nodepool_elements_dir = "/etc/project-config/${base}nodepool/elements"
  47. $zuul_layout_dir = "/etc/project-config/${base}zuul"
  48. }