This commit is contained in:
Guillem Hernandez Sola
2026-06-30 16:15:29 +02:00
parent 9354c99f00
commit 7077ad4adb
35 changed files with 1168 additions and 708 deletions

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,26 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,10 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,10 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,10 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -2,7 +2,7 @@ pipeline {
agent any agent any
options { options {
timeout(time: 20, unit: 'MINUTES') timeout(time: 15, unit: 'MINUTES')
timestamps() timestamps()
buildDiscarder(logRotator(numToKeepStr: '10')) buildDiscarder(logRotator(numToKeepStr: '10'))
disableConcurrentBuilds() disableConcurrentBuilds()
@@ -12,13 +12,8 @@ pipeline {
cron('H/30 * * * *') cron('H/30 * * * *')
} }
environment {
VENV_DIR = 'venv'
PIP_CACHE_DIR = "${WORKSPACE}/.pip-cache"
PYTHONUNBUFFERED = '1'
}
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
checkout scm checkout scm
@@ -28,14 +23,16 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -euxo pipefail set -e
cd "$WORKSPACE"
python3 -m venv "${VENV_DIR}" # Crea el venv
python3 -m venv venv
# Always use venv python explicitly # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
"${VENV_DIR}/bin/python" -m pip install --upgrade pip wheel setuptools "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"${VENV_DIR}/bin/pip" install --cache-dir "${PIP_CACHE_DIR}" -U \ "$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \ atproto \
tweety-ns \ tweety-ns \
playwright \ playwright \
@@ -43,21 +40,24 @@ pipeline {
arrow \ arrow \
python-dotenv \ python-dotenv \
moviepy \ moviepy \
fastfeedparser \
beautifulsoup4 \
charset-normalizer \
Pillow \
grapheme grapheme
# Verify required imports # Verificació moviepy
"${VENV_DIR}/bin/python" -c "import fastfeedparser; print('fastfeedparser OK')" "$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
"${VENV_DIR}/bin/python" -c "import moviepy; print('moviepy OK')" || { echo 'MoviePy installation failed!'; exit 1; }
# Check FFmpeg # Verificació FFmpeg
ffmpeg -version ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Install Playwright browser binaries in this workspace environment # Verificació imports
"${VENV_DIR}/bin/python" -m playwright install chromium "$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,31 +23,45 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }
stage('Run Script') { stage('Run Script') {
steps { steps {
// Securely inject Jenkins credentials as environment variables // Securely inject Jenkins credentials as environment variables

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,10 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -16,7 +16,6 @@ pipeline {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -24,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,27 +23,41 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }

View File

@@ -13,9 +13,9 @@ pipeline {
} }
stages { stages {
stage('Checkout Code') { stage('Checkout Code') {
steps { steps {
// Pulls the code from the repository where this Jenkinsfile lives
checkout scm checkout scm
} }
} }
@@ -23,31 +23,45 @@ pipeline {
stage('Setup Python & Install Dependencies') { stage('Setup Python & Install Dependencies') {
steps { steps {
sh ''' sh '''
set -e # Exit immediately if a command exits with a non-zero status set -e
cd "$WORKSPACE"
# Create a virtual environment named 'venv'
python3 -m venv venv
# Activate the virtual environment and install dependencies
. venv/bin/activate && \
pip install --upgrade pip && \
pip install -U atproto tweety-ns playwright httpx arrow python-dotenv moviepy grapheme
# Check if moviepy is installed
pip list | grep moviepy || { echo 'MoviePy installation failed!'; exit 1; }
# Check if FFmpeg is installed
ffmpeg -version || { echo 'FFmpeg is not installed!'; exit 1; }
# Verify that moviepy can be imported # Crea el venv
python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } python3 -m venv venv
# Install the local browser binaries for this environment # Usa python3 -m pip per evitar problemes de shebang amb sh/dash
playwright install chromium "$WORKSPACE/venv/bin/python3" -m pip install --upgrade pip wheel setuptools
"$WORKSPACE/venv/bin/python3" -m pip install -U \
atproto \
tweety-ns \
playwright \
httpx \
arrow \
python-dotenv \
moviepy \
grapheme
# Verificació moviepy
"$WORKSPACE/venv/bin/python3" -m pip list | grep moviepy \
|| { echo 'MoviePy installation failed!'; exit 1; }
# Verificació FFmpeg
ffmpeg -version \
|| { echo 'FFmpeg is not installed!'; exit 1; }
# Verificació imports
"$WORKSPACE/venv/bin/python3" -c "import moviepy; print('moviepy OK')"
"$WORKSPACE/venv/bin/python3" -c "import atproto; print('atproto OK')"
"$WORKSPACE/venv/bin/python3" -c "import playwright; print('playwright OK')"
# Instal·lació binaris Playwright
PLAYWRIGHT_BROWSERS_PATH=/var/jenkins_home/.playwright-browsers \
"$WORKSPACE/venv/bin/python3" -m playwright install chromium
''' '''
} }
} }
stage('Run Script') { stage('Run Script') {
steps { steps {
// Securely injects Jenkins credentials as environment variables // Securely injects Jenkins credentials as environment variables