Three major improvements: 1. Rootless Docker refactor: Removes docker/binary modes, unifies to rootless Docker with per-runner system users. Each runner gets its own rootless Docker daemon, systemd user service, and isolated environment. Simplifies CLI (removes --mode option), Ansible role (single code path), and molecule scenarios (removes binary scenario). 2. Auto-merge fix: Fixes status check context mismatch in branch protection (was requiring "lint", "unit-tests", "molecule-tests" but actual contexts are "CI / quality", "CI / molecule-tests*"). Adds retry/wait logic to auto_merge.py that polls commit statuses for up to 15 minutes before attempting merge, eliminating the chicken-and-egg problem where auto-merge would fail because CI hadn't completed yet. 3. Molecule platform matrix: Adds OS platform matrix to CI — all 6 scenarios now run on all 4 supported OSes (ubuntu-2204, ubuntu-2404, debian-12, archlinux) = 24 test pairs distributed across 3 parallel runners. Updates distribute_molecule.py to distribute (scenario, platform) pairs. Updates Makefile with molecule-all target for local multi-platform testing. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
---
|
|
- name: Ensure work directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ gitea_runner_data_dir }}"
|
|
state: directory
|
|
owner: "{{ gitea_runner_service_user }}"
|
|
group: "{{ gitea_runner_service_user }}"
|
|
mode: "0755"
|
|
|
|
- name: Check if runner is already registered
|
|
ansible.builtin.stat:
|
|
path: "{{ gitea_runner_data_dir }}/.runner"
|
|
register: runner_registered
|
|
|
|
- name: Register runner with Gitea
|
|
ansible.builtin.command: >
|
|
{{ gitea_runner_binary_path }} register
|
|
--token {{ registration_token }}
|
|
--name {{ runner_name }}
|
|
--instance {{ gitea_url }}
|
|
--labels {{ runner_labels }}
|
|
--no-interactive
|
|
args:
|
|
chdir: "{{ gitea_runner_data_dir }}"
|
|
become: true
|
|
become_user: "{{ gitea_runner_service_user }}"
|
|
environment:
|
|
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
|
DOCKER_HOST: "unix:///run/user/{{ gitea_runner_uid }}/docker.sock"
|
|
when: not runner_registered.stat.exists
|
|
register: register_output
|
|
changed_when: "'already exists' not in register_output.stdout | default('')"
|
|
timeout: 60
|