This commit is contained in:
Guillem Hernandez Sola
2026-06-30 15:48:03 +02:00
parent 4342adc48a
commit b928fdac0d

View File

@@ -26,11 +26,13 @@ pipeline {
set -e
cd "$WORKSPACE"
# Crea el venv
python3 -m venv venv
"$WORKSPACE/venv/bin/pip" install --upgrade pip wheel setuptools
# Usa sempre python3 -m pip, mai el binari pip directament
"$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/pip" install -U \
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
playwright \
playwright-stealth \
@@ -46,14 +48,14 @@ pipeline {
curl-cffi
# Sanity checks
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
"$WORKSPACE/venv/bin/python3" -c "import yt_dlp; print('yt_dlp OK')"
"$WORKSPACE/venv/bin/python3" -c "import curl_cffi; print('curl_cffi OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
"$WORKSPACE/venv/bin/python3" -c "import yt_dlp; print('yt_dlp OK')"
"$WORKSPACE/venv/bin/python3" -c "import curl_cffi; print('curl_cffi OK')"
# Playwright browser binaries
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/playwright" install chromium
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
'''
}
}
@@ -106,8 +108,8 @@ pipeline {
)
sh 'rm -f "$WORKSPACE/tiktok_cookies.json" || true'
}
success { echo '✅ Sync cycle completed successfully.' }
failure { echo '❌ Sync cycle failed — check archived logs and screenshots.' }
success { echo '✅ Sync cycle completed successfully.' }
failure { echo '❌ Sync cycle failed — check archived logs and screenshots.' }
unstable { echo '⚠️ Sync cycle finished with warnings.' }
}
}