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
This commit is contained in:
James E. Blair committed 2022-04-13 14:17:04 -07:00
1 parent c34cc252b0
commit 5a07b18b72
1 file changed
+12 -2
+12 -2
View File
@@ -9,10 +9,20 @@
post_tasks:
- name: Install software
- name: Install pip
shell: |+
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install src/opendev.org/zuul/zuul
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