Files
zuul/playbooks/zuul-stream/pre.yaml
T
James E. Blair 5a07b18b72 Fix git error in stream jobs
New versions of git refuse to run on git repos owned by a user
other than the caller.  This is due to a fix for
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24765

The stream jobs install Zuul as root while the repo is owned by
zuul.  This causes pbr to run git which runs afoul of that issue.
To correct this, run a wheel build as the zuul user first and
install the wheel.

Change-Id: Id48245f715760c436ae46415f057358e1b687181
2022-04-13 14:17:04 -07:00

44 lines
1.0 KiB
YAML

- hosts: controller
roles:
- role: ensure-pip
- role: bindep
bindep_profile: test
bindep_dir: src/opendev.org/zuul/zuul
post_tasks:
- name: Install pip
shell: |+
python3 -m pip install --upgrade pip setuptools wheel
become: yes
- name: Build wheel
shell:
chdir: src/opendev.org/zuul/zuul
cmd: |+
python3 setup.py bdist_wheel
- name: Install software
shell: |+
python3 -m pip install src/opendev.org/zuul/zuul/dist/*.whl
become: yes
- name: Install managed ansible versions
command: /usr/local/bin/zuul-manage-ansible -v
become: yes
- name: Copy inventory
copy:
src: "{{ zuul.executor.log_root }}/zuul-info/inventory.yaml"
dest: "{{ ansible_user_dir }}/inventory.yaml"
- name: Copy ansible.cfg
template:
src: templates/ansible.cfg.j2
dest: "{{ ansible_user_dir }}/ansible.cfg"
- name: Generate logging config
command: python3 src/opendev.org/zuul/zuul/zuul/ansible/logconfig.py