From 4c5160641f075b7573a9769c8991f30fb1e0b7aa Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 14 Mar 2025 09:00:58 -0700 Subject: [PATCH] Run the Gerritlib Jeepyb Gerrit integration job on Noble Noble has python 3.12 which is what we're trying to move our Gerrit container images to. Update testing here to ensure we're covering this python runtime before we update production. We need to change how we install jeepyb and gerritlib in testing to accomodate restrictions on global pip installs with newer python. Change-Id: I21053ee8f646d1ab4abdfd606ac935d94bcf4923 --- .zuul.yaml | 2 +- playbooks/jeepyb-integration/post.yaml | 4 +-- playbooks/jeepyb-integration/run.yaml | 34 +++++++++++++------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 63e3c50..eac2741 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,7 +1,7 @@ - job: name: gerritlib-jeepyb-integration description: Run manage_projects with gerritlib from source against Gerrit - nodeset: ubuntu-jammy + nodeset: ubuntu-noble pre-run: playbooks/jeepyb-integration/pre.yaml run: playbooks/jeepyb-integration/run.yaml post-run: playbooks/jeepyb-integration/post.yaml diff --git a/playbooks/jeepyb-integration/post.yaml b/playbooks/jeepyb-integration/post.yaml index 2c6ca61..b97ffca 100644 --- a/playbooks/jeepyb-integration/post.yaml +++ b/playbooks/jeepyb-integration/post.yaml @@ -8,8 +8,8 @@ - name: Save docker log files become: true shell: | - docker logs tools_gerrit_1 > {{ ansible_user_dir }}/logs/gerrit.log 2>&1 - docker logs tools_gerritconfig_1 > {{ ansible_user_dir }}/logs/gerritconfig.log 2>&1 + docker logs tools-gerrit-1 > {{ ansible_user_dir }}/logs/gerrit.log 2>&1 + docker logs tools-gerritconfig-1 > {{ ansible_user_dir }}/logs/gerritconfig.log 2>&1 - name: Copy docker log files to executor synchronize: mode: pull diff --git a/playbooks/jeepyb-integration/run.yaml b/playbooks/jeepyb-integration/run.yaml index 09e4460..9705a10 100644 --- a/playbooks/jeepyb-integration/run.yaml +++ b/playbooks/jeepyb-integration/run.yaml @@ -12,25 +12,25 @@ state: directory path: "/tmp/jeepyb-cache" - name: Install jeepyb - command: python3 -m pip install src/opendev.org/opendev/jeepyb - become: true + pip: + name: /home/zuul/src/opendev.org/opendev/jeepyb + virtualenv: /home/zuul/venv + virtualenv_command: "python3 -m venv" - name: Install gerritlib # Install after Jeepyb so that we don't use gerritlib from pypi - command: python3 -m pip install src/opendev.org/opendev/gerritlib - become: true + pip: + name: /home/zuul/src/opendev.org/opendev/gerritlib + virtualenv: /home/zuul/venv + virtualenv_command: "python3 -m venv" # Run a gerrit - - name: Install docker-compose - pip: - name: - - requests<2.30.0 - - docker<7.0.0 - - docker-compose - state: present + - name: Install docker compose + package: + name: docker-compose-plugin become: true - - name: Run docker-compose up + - name: Run docker compose up shell: - cmd: docker-compose up -d + cmd: docker compose up -d chdir: src/opendev.org/opendev/gerritlib/tools/ - name: Wait for Gerrit Admin user to be created uri: @@ -67,11 +67,11 @@ # Test jeepyb and gerritlib - name: Manage single gerrit project shell: - cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml manage-projects -d test/test-repo-1 + cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml /home/zuul/venv/bin/manage-projects -d test/test-repo-1 chdir: src/opendev.org/opendev/gerritlib - name: Manage all gerrit projects shell: - cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml manage-projects -d + cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml /home/zuul/venv/bin/manage-projects -d chdir: src/opendev.org/opendev/gerritlib - name: Change test-repo-2 acls but don't change groups # Lineinfile only replaces the last match so we do this twice @@ -87,11 +87,11 @@ line: ' acl-config: tools/acls/test/test2.config' - name: Update single gerrit project with new acl shell: - cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml manage-projects -d test/test-repo-1 + cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml /home/zuul/venv/bin/manage-projects -d test/test-repo-1 chdir: src/opendev.org/opendev/gerritlib - name: Manage all gerrit projects again after acl update shell: - cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml manage-projects -d + cmd: PROJECTS_INI=tools/projects.ini PROJECTS_YAML=tools/projects.yaml /home/zuul/venv/bin/manage-projects -d chdir: src/opendev.org/opendev/gerritlib - name: Check test-repo-1 exists shell: