Commit ff6c75f5 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

fix(ci): detect pip availability to handle both Docker and shell runners

Docker runner (python:3.12-slim): has pip, no curl → use pip directly.
Shell runner (host Python 3.13): no pip, has curl → venv --without-pip
+ get-pip.py bootstrap. Detect via 'pip --version' and branch accordingly.
parent e6caa526
Loading
Loading
Loading
Loading
Loading
+3 −9
Changes for .gitlab-ci.yml: 3 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -19,9 +19,7 @@ cache:
.ansible_setup:
  before_script:
    - python3 --version
    - python3 -m venv --without-pip .venv
    - source .venv/bin/activate
    - curl -sS https://bootstrap.pypa.io/get-pip.py | python3
    - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; }
    - pip install --upgrade pip
    - pip install -r ansible/requirements.txt
    - ansible-galaxy collection install -r ansible/requirements.yml
@@ -70,9 +68,7 @@ docs:
  stage: docs
  script:
    - python3 --version
    - python3 -m venv --without-pip .venv
    - source .venv/bin/activate
    - curl -sS https://bootstrap.pypa.io/get-pip.py | python3
    - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; }
    - pip install --upgrade pip
    - pip install -r docs/requirements.txt
    - mkdocs build --strict
@@ -85,9 +81,7 @@ pages:
  stage: deploy
  script:
    - python3 --version
    - python3 -m venv --without-pip .venv
    - source .venv/bin/activate
    - curl -sS https://bootstrap.pypa.io/get-pip.py | python3
    - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; }
    - pip install --upgrade pip
    - pip install -r docs/requirements.txt
    - mkdocs build --strict