Some fixes

This commit is contained in:
Guillem Hernandez Sola
2026-05-19 12:06:14 +02:00
parent 8c13f0c355
commit bb6f0e0139
2 changed files with 57 additions and 23 deletions

View File

@@ -37,19 +37,25 @@ pipeline {
sh '''
set -euxo pipefail
# Create venv
# ── Playwright system dependencies (required in CI) ─
# Installs libglib, libnss, libatk, libdrm, etc.
# Safe to run even if already installed — exits 0.
"${VENV_DIR}/bin/python" -m playwright install-deps chromium || \
sudo playwright install-deps chromium || \
echo "⚠️ playwright install-deps skipped (no sudo) — continuing"
# ── Create venv ────────────────────────────────────
python3 -m venv "${VENV_DIR}"
# Upgrade pip toolchain
# ── Upgrade pip toolchain ──────────────────────────
"${VENV_DIR}/bin/python" -m pip install --upgrade pip wheel setuptools
# Install all required packages
# ── Install all required packages ──────────────────
"${VENV_DIR}/bin/pip" install \
--cache-dir "${PIP_CACHE_DIR}" \
-U \
atproto \
playwright \
yt-dlp \
httpx \
arrow \
python-dotenv \
@@ -59,8 +65,20 @@ pipeline {
Pillow \
grapheme
# ── Install playwright-stealth and detect version ──
"${VENV_DIR}/bin/pip" install --cache-dir "${PIP_CACHE_DIR}" -U playwright-stealth
# ── yt-dlp: always upgrade to latest ──────────────
# TikTok extractor breaks frequently — latest is required
"${VENV_DIR}/bin/pip" install \
--cache-dir "${PIP_CACHE_DIR}" \
--upgrade \
"yt-dlp"
# Print installed yt-dlp version for traceability
"${VENV_DIR}/bin/pip" show yt-dlp | grep -E "^(Name|Version)"
# ── playwright-stealth ─────────────────────────────
"${VENV_DIR}/bin/pip" install \
--cache-dir "${PIP_CACHE_DIR}" \
-U playwright-stealth
# Print which version was installed for traceability
"${VENV_DIR}/bin/pip" show playwright-stealth | grep -E "^(Name|Version)"
@@ -87,7 +105,7 @@ except ImportError:
ffmpeg -version | head -1
ffprobe -version | head -1
# ── Playwright browser binaries (no sudo needed) ───
# ── Playwright browser binaries ────────────────────
"${VENV_DIR}/bin/python" -m playwright install chromium
'''
}
@@ -141,7 +159,7 @@ except ImportError:
post {
always {
// Archive logs, state, and any CAPTCHA/debug screenshots
// Archive logs, state, and any debug screenshots
archiveArtifacts(
artifacts: '*.log, *.json, screenshot_*.png',
allowEmptyArchive: true