From 9cfdc84cb16968eadfc99bbf9ea22f147e355aca Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 11 Sep 2024 16:46:18 +0000 Subject: [PATCH] Fix amphora image builds to use DIB bindep The amphora image builds are currently failing because we are trying to install the binary packages for diskimage-builder ourselves in the ansible for the job. This patch changes that to use the bindep.txt included with diskimage-builder. Change-Id: I8e489b251ff0e58809b66c0145023769abef6e68 (cherry picked from commit d682e74d33073dede4476e8de3e20766dc49063a) --- playbooks/image-build/run.yaml | 52 +++++----------------------------- zuul.d/jobs.yaml | 7 +---- 2 files changed, 8 insertions(+), 51 deletions(-) diff --git a/playbooks/image-build/run.yaml b/playbooks/image-build/run.yaml index a19afe05ac..5e02135827 100644 --- a/playbooks/image-build/run.yaml +++ b/playbooks/image-build/run.yaml @@ -8,51 +8,6 @@ become: yes when: - ansible_os_family == 'RedHat' - - name: Install apt packages - apt: - pkg: "{{ item }}" - state: "latest" - update_cache: yes - register: install_packages - become: yes - until: install_packages is success - retries: 5 - delay: 2 - with_items: - - qemu-utils - - uuid-runtime - - curl - - kpartx - - python3-yaml - - debootstrap - - qemu - - bc - - python3-venv - - python3-setuptools - when: - - ansible_os_family == 'Debian' - - name: Install rpm packages - dnf: - pkg: "{{ item }}" - state: "latest" - update_cache: yes - register: install_packages - become: yes - until: install_packages is success - retries: 5 - delay: 2 - with_items: - - qemu-img - - uuid - - curl - - kpartx - - python3-pyyaml - - qemu-kvm - - python3-setuptools - - yum - - podman - when: - - ansible_os_family == 'RedHat' - name: Install required pip packages pip: name: "{{ item }}" @@ -65,7 +20,14 @@ delay: 2 become: yes with_items: + - bindep - diskimage-builder + - setuptools + - name: Install binary dependencies from diskimage-builder + include_role: + name: bindep + vars: + bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/diskimage-builder'].src_dir }}" - name: Ensure artifacts/images directory exists file: path: '{{ ansible_user_dir }}/test-images' diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 18da8352ac..49c741b312 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -147,6 +147,7 @@ not Git master. This job does not publish the image. run: playbooks/image-build/run.yaml required-projects: + - openstack/diskimage-builder - openstack/octavia - openstack/octavia-lib vars: @@ -159,8 +160,6 @@ description: | Builds an Ubuntu Jammy amphora image using diskimage-builder from Git master. This job does not publish the image. - required-projects: - - openstack/diskimage-builder vars: amphora_os: ubuntu amphora_os_release: jammy @@ -172,8 +171,6 @@ description: | Builds a CentOS 9 Stream amphora image using diskimage-builder from Git master. This job does not publish the image. - required-projects: - - openstack/diskimage-builder vars: amphora_os: centos amphora_os_release: 9-stream @@ -185,8 +182,6 @@ description: | Builds a Rocky Linux 9 amphora image using diskimage-builder from Git master. This job does not publish the image. - required-projects: - - openstack/diskimage-builder vars: amphora_os: rocky amphora_os_release: 9