From 73d2ed26577c3bf3ec658d578895033569ae471c Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Thu, 20 Jun 2024 04:01:45 -0500 Subject: [PATCH] Fix requirements build for master The requirements.sh script fails on master due to this https://review.opendev.org/c/openstack/requirements/+/921656 Also Ansible docker_container module is not compatible with the recent docker daemon. Change-Id: Ib9440cbf2a5196c31a7669edd73472d685a754a5 --- playbooks/setup-gate.yaml | 13 +++---------- scripts/requirements.sh | 11 ++++++----- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/playbooks/setup-gate.yaml b/playbooks/setup-gate.yaml index bdd0a387..2ec40eb0 100644 --- a/playbooks/setup-gate.yaml +++ b/playbooks/setup-gate.yaml @@ -12,16 +12,8 @@ block: - include_role: name: ensure-docker - - pip: - name: - - docker - - docker_container: - name: registry - image: registry:2 - state: started - restart_policy: "always" - published_ports: - - 172.17.0.1:5000:5000 + - shell: | + docker run -d --name registry --restart always -p 172.17.0.1:5000:5000 docker.io/registry:2 become: True - name: Setup http server for git repos @@ -49,4 +41,5 @@ name: - apache2 - gitweb + - python3-requests become: True diff --git a/scripts/requirements.sh b/scripts/requirements.sh index e27d09d9..117f7156 100755 --- a/scripts/requirements.sh +++ b/scripts/requirements.sh @@ -33,11 +33,12 @@ if [[ "$(uname -p)" == "aarch64" ]]; then fi # Remove any pylxd before 2.2.7 as the old versions cannot be built in CI. -lxd_constraint=$(grep pylxd /upper-constraints.txt) -# This removes (##) everything (*) from the lxd_constraint until the last =, -# and removes all '.' to look like a number. -if (( $(echo ${lxd_constraint##*=} | sed 's#\.##g') < 227 )); then - sed -i '/pylxd/d' /upper-constraints.txt +if lxd_constraint=$(grep pylxd /upper-constraints.txt); then + # This removes (##) everything (*) from the lxd_constraint until the last =, + # and removes all '.' to look like a number. + if (( $(echo ${lxd_constraint##*=} | sed 's#\.##g') < 227 )); then + sed -i '/pylxd/d' /upper-constraints.txt + fi fi mkdir /source-wheels