Drop project-config support

The most I started thinking about this, the more it should be in an
external project.  We've exposed everything the user needs to override
the default settings and reload zuul.

Change-Id: I3b7c08f1511100ccbf50ba1eb8fd7dd220c9eab4
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2015-12-16 11:59:29 -05:00
parent 2eed4399ee
commit 79aec371c1
4 changed files with 30 additions and 39 deletions

View File

@ -17,8 +17,11 @@ zuul_user_name: zuul
zuul_user_group: "{{ zuul_user_name }}" zuul_user_group: "{{ zuul_user_name }}"
zuul_user_home: "/var/lib/{{ zuul_user_name }}" zuul_user_home: "/var/lib/{{ zuul_user_name }}"
zuul_project_config_dir: "" zuul_file_layout_yaml_dest: /etc/zuul/layout.yaml
zuul_project_config_dir_dest: /etc/zuul/config zuul_file_layout_yaml_group: "{{ zuul_user_name }}"
zuul_file_layout_yaml_mode: "0644"
zuul_file_layout_yaml_owner: "{{ zuul_user_group }}"
zuul_file_layout_yaml_src: etc/zuul/layout.yaml
zuul_config_gearman_port: 4730 zuul_config_gearman_port: 4730
zuul_config_gearman_server: 127.0.0.1 zuul_config_gearman_server: 127.0.0.1
@ -38,7 +41,7 @@ zuul_config_merger_git_user_name: ""
zuul_config_merger_log_config: /etc/zuul/merger-logging.conf zuul_config_merger_log_config: /etc/zuul/merger-logging.conf
zuul_config_merger_zuul_url: 127.0.0.1 zuul_config_merger_zuul_url: 127.0.0.1
zuul_config_zuul_layout_config: "{{ zuul_project_config_dir_dest }}/layout.yaml" zuul_config_zuul_layout_config: "{{ zuul_file_layout_yaml_dest }}"
zuul_config_zuul_log_config: /etc/zuul/server-logging.conf zuul_config_zuul_log_config: /etc/zuul/server-logging.conf
zuul_config_zuul_state_dir: "{{ zuul_user_home }}" zuul_config_zuul_state_dir: "{{ zuul_user_home }}"

View File

@ -0,0 +1,8 @@
# This file is generated by Ansible
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
pipelines: []
jobs: []
projects: []

View File

@ -59,24 +59,11 @@
src: "{{ zuul_file_server_logging_conf }}" src: "{{ zuul_file_server_logging_conf }}"
notify: Reload zuul-server notify: Reload zuul-server
- name: Create project config directory. - name: Copy layout yaml file.
file: copy:
group: "{{ ansible_ssh_user }}" dest: "{{ zuul_file_layout_yaml_dest }}"
mode: 0775 group: "{{ zuul_file_layout_yaml_group }}"
owner: "{{ ansible_ssh_user }}" mode: "{{ zuul_file_layout_yaml_mode }}"
path: "{{ item }}" owner: "{{ zuul_file_layout_yaml_owner }}"
state: directory src: "{{ zuul_file_layout_yaml_src }}"
with_items:
- "{{ zuul_project_config_dir_dest }}"
notify: Reload zuul-server
- name: Rsync project config directory.
sudo: no
synchronize:
dest: "{{ zuul_project_config_dir_dest }}"
perms: yes
rsync_opts:
- '--delete'
src: "{{ zuul_project_config_dir }}"
when: zuul_project_config_dir != ""
notify: Reload zuul-server notify: Reload zuul-server

View File

@ -64,26 +64,19 @@
- zuul_git_dest_stat.stat.exists - zuul_git_dest_stat.stat.exists
- zuul_git_dest_stat.stat.isdir - zuul_git_dest_stat.stat.isdir
- name: Register zuul_project_config_dir_dest_stat. - name: Register /etc/zuul/layout.yaml
stat: stat:
path: /etc/zuul/config path: /etc/zuul/layout.yaml
register: zuul_project_config_dir_dest_stat register: zuul_layout_yaml_stat
- name: Assert zuul_project_config_dir_dest tests. - name: Assert zuul_layout_yaml_stat tests.
assert: assert:
that: that:
- zuul_project_config_dir_dest_stat.stat.exists - zuul_layout_yaml_stat.stat.exists
- zuul_project_config_dir_dest_stat.stat.isdir - zuul_layout_yaml_stat.stat.isreg
# NOTE(pabelanger): This means we are hardcoded to the - zuul_layout_yaml_stat.stat.pw_name == 'zuul'
# openstack-infra jenkins user in nodepool. - zuul_layout_yaml_stat.stat.gr_name == 'zuul'
- zuul_project_config_dir_dest_stat.stat.pw_name == 'jenkins' - zuul_layout_yaml_stat.stat.mode == '0644'
- zuul_project_config_dir_dest_stat.stat.gr_name == 'jenkins'
- zuul_project_config_dir_dest_stat.stat.mode == '0775'
- name: Ensure /etc/zuul/config is empty.
shell: "ls -1 /etc/zuul/config | wc -l"
register: result
failed_when: result.stdout != "0"
- name: Register /etc/init.d/zuul-merger - name: Register /etc/init.d/zuul-merger
stat: stat: