From 87d6df273b3182d962d7b04e9d0b104bdb0c5957 Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Mon, 30 Mar 2026 18:16:37 +0200 Subject: [PATCH] Added new yml --- jenkins/FCBFutbolSalaTw | 23 ++++++++++++++++++----- jenkins/FCBHandbolTw | 23 ++++++++++++++++++----- jenkins/FCBHoqueiTw | 23 ++++++++++++++++++----- jenkins/FCBMasiaTw | 23 ++++++++++++++++++----- jenkins/crunchyTw | 25 +++++++++++++++++++------ jenkins/emergenciescatTw | 23 ++++++++++++++++++----- jenkins/fcbarcelonaTw | 25 +++++++++++++++++++------ jenkins/fcbatleticTw | 23 ++++++++++++++++++----- jenkins/fcbbasketTw | 23 ++++++++++++++++++----- jenkins/fcbfemeniTw | 23 ++++++++++++++++++----- jenkins/meteocatTw | 23 ++++++++++++++++++----- jenkins/mossosTw | 23 ++++++++++++++++++----- jenkins/semgencatTw | 23 +++++++++++++++++++++-- jenkins/transitTw | 23 ++++++++++++++++++----- 14 files changed, 257 insertions(+), 69 deletions(-) diff --git a/jenkins/FCBFutbolSalaTw b/jenkins/FCBFutbolSalaTw index 3964b14..88125aa 100644 --- a/jenkins/FCBFutbolSalaTw +++ b/jenkins/FCBFutbolSalaTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/FCBHandbolTw b/jenkins/FCBHandbolTw index 7e425bc..c34c3d0 100644 --- a/jenkins/FCBHandbolTw +++ b/jenkins/FCBHandbolTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/FCBHoqueiTw b/jenkins/FCBHoqueiTw index 34bab41..4ee6635 100644 --- a/jenkins/FCBHoqueiTw +++ b/jenkins/FCBHoqueiTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/FCBMasiaTw b/jenkins/FCBMasiaTw index f555360..65ca60f 100644 --- a/jenkins/FCBMasiaTw +++ b/jenkins/FCBMasiaTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/crunchyTw b/jenkins/crunchyTw index 4994a23..bb10b5b 100644 --- a/jenkins/crunchyTw +++ b/jenkins/crunchyTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,19 +17,31 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } } - + stage('Run Script') { steps { // Securely inject Jenkins credentials as environment variables diff --git a/jenkins/emergenciescatTw b/jenkins/emergenciescatTw index 559fc63..14dc869 100644 --- a/jenkins/emergenciescatTw +++ b/jenkins/emergenciescatTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/fcbarcelonaTw b/jenkins/fcbarcelonaTw index 5e4454b..1bbeff5 100644 --- a/jenkins/fcbarcelonaTw +++ b/jenkins/fcbarcelonaTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,19 +17,31 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } } - + stage('Run Script') { steps { // Securely inject Jenkins credentials as environment variables diff --git a/jenkins/fcbatleticTw b/jenkins/fcbatleticTw index be24bd4..376d90f 100644 --- a/jenkins/fcbatleticTw +++ b/jenkins/fcbatleticTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/fcbbasketTw b/jenkins/fcbbasketTw index 29fe047..0b2b6be 100644 --- a/jenkins/fcbbasketTw +++ b/jenkins/fcbbasketTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/fcbfemeniTw b/jenkins/fcbfemeniTw index 7832073..fb95de4 100644 --- a/jenkins/fcbfemeniTw +++ b/jenkins/fcbfemeniTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/meteocatTw b/jenkins/meteocatTw index 3785d17..57550fc 100644 --- a/jenkins/meteocatTw +++ b/jenkins/meteocatTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/mossosTw b/jenkins/mossosTw index 3ac2029..f96054f 100644 --- a/jenkins/mossosTw +++ b/jenkins/mossosTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/semgencatTw b/jenkins/semgencatTw index ff65359..8f206d4 100644 --- a/jenkins/semgencatTw +++ b/jenkins/semgencatTw @@ -2,12 +2,14 @@ pipeline { agent any triggers { + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -15,9 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + + # Create a virtual environment named 'venv' python3 -m venv venv - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + + # 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 + + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' } diff --git a/jenkins/transitTw b/jenkins/transitTw index 2eb3df9..28a7fb9 100644 --- a/jenkins/transitTw +++ b/jenkins/transitTw @@ -2,13 +2,14 @@ pipeline { agent any triggers { - // 'H' balances the load on Jenkins, running roughly every 30 minutes + // 'H' tells Jenkins to balance the load, running roughly every 30 minutes cron('H/30 * * * *') } stages { stage('Checkout Code') { steps { + // Pulls the code from the repository where this Jenkinsfile lives checkout scm } } @@ -16,14 +17,26 @@ pipeline { stage('Setup Python & Install Dependencies') { steps { sh ''' + set -e # Exit immediately if a command exits with a non-zero status + # Create a virtual environment named 'venv' python3 -m venv venv - # Activate it and install the required packages - . venv/bin/activate - pip install -U atproto tweety-ns playwright httpx arrow python-dotenv -q + # 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 - # Install the local browser binaries for this specific environment + # 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 + python3 -c "import moviepy" || { echo 'MoviePy import failed!'; exit 1; } + + # Install the local browser binaries for this environment playwright install chromium ''' }